JavaScript – Math LN2 属性
描述
它返回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 
极客教程