Home > Article > Web Front-end > JavaScript returns the property LN2 of the natural logarithm of 2 (approximately equal to 0.693)
Definition and usage
LN2 Attribute is loge2, which is the natural logarithm of 2, and its value is approximately 0.69314718055994528623.
Syntax
Math.LN2
Examples
Return the natural logarithm of 2:
<script type="text/javascript"> document.write("LN2: " + Math.LN2); </script>
Output:
LN2: 0.6931471805599453
Example:
<html> <head> <title>JavaScript Math E Property</title> </head> <body> <script type="text/javascript"> var property_value = Math.E document.write("Property Value is : " + property_value); </script> </body> </html>
This will produce the following results:
Property Value is : 2.718281828459045
The above is the detailed content of JavaScript returns the property LN2 of the natural logarithm of 2 (approximately equal to 0.693). For more information, please follow other related articles on the PHP Chinese website!