Home >>JavaScript Math Reference >JavaScript LOG2E Property

JavaScript LOG2E Property

JavaScript LOG2E Property

JavaScript LOG2E property is used to return the base-2 logarithm of E. Its value is approximately 1.442.



Browser Support

Property Chrome Edge Firefox Safari Opera
LOG2E Yes Yes Yes Yes Yes

Here is an example of JavaScript LOG2 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.LOG2E;

Click the button to see the Output.