JavaScript 中的 Math.LOG2E 属性

htmljavascriptweb developmentfront end technology

Math 对象的 LOG2E 属性表示以 2 为底的对数值。

语法

其语法如下

Math.LOG2E

示例

<html>
<head>
   <title>JavaScript 示例</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.LOG2E;
      document.write(result);
   </script>
</body>
</html>

输出

1.4426950408889634

相关文章