JavaScript Tutorial/Math/LOG2E

Материал из Web эксперт
Перейти к: навигация, поиск

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.



   <source lang="javascript">

<html>

   <body>
   <script language="JavaScript">
   
   </script>
   <form name=form1>
   The Base 2 logarithm of Euler"s constant is:
   <input type="text" name="answer" size=20>
   <input type="button" value="Calculate" onClick="doMath()">
   
</form> </body> </html></source>

The value of the Logarithm to base 2 of E: Math.LOG2E

   <source lang="javascript">

<html> <head> <title>The Properties of the Math object</title> <script type="text/javascript" language="javascript">

</script> </head> <body onload="DisplayMath()"> </body> </html></source>