Home >>JavaScript Math Reference >JavaScript LN2 Property

JavaScript LN2 Property

JavaScript LN2 Property

JavaScript LN2 property is used to return the natural logarithm of 2. It’s value is approximately 0.693.



Browser Support

Property Chrome Edge Firefox Safari Opera
LN2 Yes Yes Yes Yes Yes

Here is an example of JavaScript LN2 property:

<p>Click the button to see the Output.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
function myFunction() {
  document.getElementById("demo").innerHTML = Math.LN2;

Click the button to see the Output.