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

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

时间:2024-02-06 14:31:41浏览次数:27  
标签:es6 console log 无涯 --- 17.5 Math

返回X的自然对数。

Math.log(x) - 语法

Math.log(x)    
  • x    -  代表数字

Math.log(x) - 示例

console.log("---Math.log()---") 
console.log("Math.log(Math.E): "+Math.log(Math.E)) 
console.log("Math.log(17.5): "+Math.log(17.5))         

运行上面代码输出

---Math.log()--- 
Math.log(Math.E): 1 
Math.log(17.5): 2.8622008809294686           

参考链接

https://www.learnfk.com/es6/es6-math-log-x.html

标签:es6,console,log,无涯,---,17.5,Math
From: https://blog.51cto.com/u_14033984/9623121

相关文章

  • 无涯教程-Math.cbrt(x)函数
    此方法返回数字的立方根。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):"......
  • 无涯教程-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:"+......
  • create-a-blog-post
    sidebar_position:3CreateaBlogPostDocusauruscreatesapageforeachblogpost,butalsoablogindexpage,atagsystem,anRSSfeed...CreateyourfirstPostCreateafileatblog/2021-02-28-greetings.md:---slug:greetingstitle:Greetings!auth......
  • 无涯教程-toLocaleDateString()函数
    JavascriptdatetoLocaleDateString()方法根据本地时间格式,把Date对象的日期部分转换为字符串。toLocaleDateString()-语法Date.toLocaleString()toLocaleDateString()-返回值使用操作系统的区域设置约定返回"Date"部分。toLocaleDateString()-示例vardt=......