JavaScript | Math.LN10属性 (JavaScript | Math.LN10 Property)
Math.LN10 is a property in math library of JavaScript that is used to find the value of natural Log of 10. It is loge(10), the value is 2.302.
Math.LN10是JavaScript数学库中的一个属性,用于查找自然Log 10的值。 它是log e (10) ,值为2.302 。
Syntax:
句法:
Math.LN10
Parameter(s):
参数:
N/A
不适用
Return value:
返回值:
The return type of this method is number, it returns a number (float value), value of LN10.
此方法的返回类型为number ,它返回一个数字(浮点值),即LN10的值。
Browser support: Chrome, Internet explorer, Mozilla, Safari, Opera mini.
浏览器支持: Chrome,Internet Explorer,Mozilla,Safari,Opera mini。
Example 1:
范例1:
console.log(Math.LN10);
Output
输出量
2.302585092994046
Example 2: Invalid values
示例2:无效值
console.log(Math.LN10("Javascript"));
Output
输出量
Uncaught TypeError: Math.LN10 is not a function
at <anonymous>:1:18
翻译自: https://www.includehelp.com/code-snippets/math-ln10-property-with-example-in-javascript.aspx