Javascript examples for Math:LOG2E
The LOG2E property returns the base-2 logarithm of E, approximately 1.442.
A Number, representing the base-2 logarithm of E
The following code shows how to return the base-2 logarithm of E:
<!DOCTYPE html> <html> <body> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*w w w. ja v a 2 s.c o m*/ document.getElementById("demo").innerHTML = Math.LOG2E; } </script> </body> </html>