Math.LOG2E : LOG2E : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » LOG2E »

 

Math.LOG2E








The LOG2E property of the Math object calculates the base 2 logarithm of Euler's constant.

The return value is approximately 1.442.












<html>
    <body>
    <script language="JavaScript">
    <!--
    function doMath(){
        var result = Math.LN2E;
        document.form1.answer.value = result;
    }
    -->
    </script>
    <form name=form1>
    The Base logarithm of Euler's constant is:
    <input type="text" name="answer" size=20>
    <input type="button" value="Calculate" onClick='doMath()'>
    <br>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» LOG2E