Home >>JavaScript Math Reference >JavaScript LN10 Property
JavaScript LN10 property is used to return the natural logarithm of 10. Its value is approximately 2.302
Syntax:
Math.LN10
Property | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
LN10 | Yes | Yes | Yes | Yes | Yes |
Here is an example of JavaScript LN10 property:
<html> <body> <p>Click the button to see the Output.</p> <button onclick="myFunction()">Try it</button> <p id="demo"></p> <script> function myFunction() { document.getElementById("demo").innerHTML = Math.LN10; } </script> </body> </html>
Click the button to see the Output.