Math.cbrt()Math.cbrt() 静态方法返回数字的立方根。那是 ¥The Math.cbrt() static method returns the cube root of a number. That is 𝙼𝚊𝚝𝚑.𝚌𝚋𝚛𝚝 ( 𝚡 ) = x 3 = the unique y such that y 3 = x \mathtt{\operatorname{Math.cbrt}(x)} = \sqrt[3]{x} = \text{the unique } y \text{ such that } y^3 = x Try it 语法¥Syntax jsMath.cbrt(x) 参数¥Parameters x 一个号码。 返回值¥Return value x 的立方根。 ¥The cube root of x. 描述¥Description 因为 cbrt() 是 Math 的静态方法,所以你始终将其用作 Math.cbrt(),而不是用作你创建的 Math 对象的方法(Math 不是构造函数)。 ¥Because cbrt() is a static method of Math, you always use it as Math.cbrt(), rather than as a method of a Math object you created (Math is not a constructor). 示例¥Examples 使用 Math.cbrt()¥Using Math.cbrt() jsMath.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 规范SpecificationECMAScript Language Specification # sec-math.cbrt¥Specifications 浏览器兼容性BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.¥Browser compatibility 也可以看看¥See also core-js 中 Math.cbrt 的 Polyfill Math.pow() Math.sqrt()