首页 > 其他分享 >无涯教程-Math.cbrt(x)函数

无涯教程-Math.cbrt(x)函数

时间:2024-02-06 12:31:47浏览次数:25  
标签:27 console log cbrt 无涯 --- Math

此方法返回数字的立方根。

Math.cbrt(x) - 语法

Math.cbrt ( x );   
  • x    -  代表数字

Math.cbrt(x) - 返回值

返回数字的立方根。

Math.cbrt(x) - 示例

console.log("---Math.cbrt()---") 
console.log("Math.cbrt(27) : "+Math.cbrt(27)) 
console.log("Math.cbrt(22) : "+Math.cbrt(22))         

运行上面代码输出

---Math.cbrt()--- 
Math.cbrt(27) : 3 
Math.cbrt(22) : 2.802039330655387             

参考链接

https://www.learnfk.com/es6/es6-math-function-cbrt.html

标签:27,console,log,cbrt,无涯,---,Math
From: https://blog.51cto.com/u_14033984/9619976

相关文章

  • 无涯教程-LOG10E函数
    E的以10为底的对数,约为0.434。LOG10E-语法Math.LOG10ELOG10E-示例console.log(Math.LOG10E)//thebase10logarithmofMath.E:0.434运行上面代码输出0.4342944819032518参考链接https://www.learnfk.com/es6/es6-math-property-log10e......
  • 无涯教程-LN10函数
    自然对数为10,约为2.302。LN10-语法Math.LN2LN10-示例console.log(Math.LN10)//thenaturallogarithmof10:~2.303运行上面代码输出2.302585092994046参考链接https://www.learnfk.com/es6/es6-math-property-ln10.html......
  • 无涯教程-LN2函数
    它返回2的自然对数,大约为0.693。LN2-语法Math.LN2LN2-示例console.log(Math.LN10)//thenaturallogarithmof10:~2.303运行上面代码输出0.6931471805599453参考链接https://www.learnfk.com/es6/es6-math-property-ln2.html......
  • 无涯教程-E函数
    这是一个欧拉常数,是自然对数的底数,大约为2.718。E-语法Math.EE-示例console.log(Math.E)//therootofthenaturallogarithm:~2.718运行上面代码输出2.718281828459045参考链接https://www.learnfk.com/es6/es6-math-property-e.html......
  • 无涯教程-valueOf()函数
    valueOf方法返回Date对象的原始值,即自UTC1970年1月1日午夜以来的毫秒数。valueOf()-语法Date.valueOf()valueOf()-返回值返回Date对象的原始值。valueOf()-示例vardateobject=newDate(1993,6,28,14,39,7);console.log(dateobject.valueOf());......
  • 无涯教程-toTimeString()函数
    此方法把Date对象的时间部分转换为字符串。toTimeString()-语法Date.toTimeString()toTimeString()-返回值形式返回Date对象的时间部分。toTimeString()-示例vardateobject=newDate(1993,6,28,14,39,7);console.log(dateobject.toTimeString());......
  • 无涯教程-toString()函数
    此方法把Date对象转换为字符串。toString()-语法Date.toString()toString()-返回值返回表示指定的Date对象的字符串。toString()-示例vardateobject=newDate(1993,6,28,14,39,7);stringobj=dateobject.toString();console.log("StringObject:"+......
  • 无涯教程-toLocaleDateString()函数
    JavascriptdatetoLocaleDateString()方法根据本地时间格式,把Date对象的日期部分转换为字符串。toLocaleDateString()-语法Date.toLocaleString()toLocaleDateString()-返回值使用操作系统的区域设置约定返回"Date"部分。toLocaleDateString()-示例vardt=......
  • 无涯教程-todatestring()函数
    JavaScriptdatetoDateString()方法 把Date对象的日期部分转换为字符串。todatestring()-语法Date.toDateString()todatestring()-返回值以人类可读的形式返回Date对象的日期部分。todatestring()-示例vardt=newDate(1993,6,28,14,39,7);consol......
  • 无涯教程-setUTCSeconds()函数
    JavascriptdatesetUTCSeconds()方法用于根据世界时(UTC)设置指定时间的秒字段。setUTCSeconds()-语法Date.setUTCSeconds(secondsValue[,msValue])secondsValue  - 0到59之间的整数,代表秒。msValue      - 一个介于0和999之间的数字,代表......