Baseline Widely available
Die Math.cbrt()
statische Methode gibt die Kubikwurzel einer Zahl zurück. Das heiÃt
console.log(Math.cbrt(-1));
// Expected output: -1
console.log(Math.cbrt(1));
// Expected output: 1
console.log(Math.cbrt(Infinity));
// Expected output: Infinity
console.log(Math.cbrt(64));
// Expected output: 4
Syntax Parameter Rückgabewert
Die Kubikwurzel von x
.
Da cbrt()
eine statische Methode von Math
ist, verwenden Sie sie immer als Math.cbrt()
und nicht als Methode eines von Ihnen erstellten Math
-Objekts (Math
ist kein Konstruktor).
Math.cbrt(-Infinity); // -Infinity
Math.cbrt(-1); // -1
Math.cbrt(-0); // -0
Math.cbrt(0); // 0
Math.cbrt(1); // 1
Math.cbrt(2); // 1.2599210498948732
Math.cbrt(Infinity); // Infinity
Spezifikationen Browser-Kompatibilität Siehe auch MDN-Feedback-Box War diese Ãbersetzung hilfreich?
Diese Seite wurde automatisch aus dem Englischen übersetzt.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4