无涯教程-LN2函数

93 阅读1分钟

它返回2的自然对数,大约为0.693。

LN2 - 语法

Math.LN2 

LN2 - 示例

console.log(Math.LN10) //the natural logarithm of 10: ~2.303 
          

运行上面代码输出

0.6931471805599453          

参考链接

www.learnfk.com/es6/es6-mat…