這將返回2的自然對數,它的值大約是 0.693.
Math.LN2
<html> <head> <title>JavaScript Math LN2 Property</title> </head> <body> <script type="text/javascript"> var property_value = Math.LN2 document.write("Property Value is : " + property_value); </script> </body> </html>
這將產生以下結果:
Property Value is : 0.6931471805599453