Math.LN2 : LN2 : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » LN2 »

 

Math.LN2








The LN2 property of the Math object is used to get the natural logarithm of 2.

This is approximately equal to 0.693.












<html>
    <body>
    <script language="JavaScript">
    <!--
    function doMath(){
        var result = Math.LN2;
        document.form1.answer.value = result;
    }
    -->
    </script>
    <form name=form1>
    The Natural Logarithm of 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
» LN2