JavaScript E 属性


定义和用法

Math.E 属性代表算术常量 e,即自然对数的底数,其值近似于 2.71828。

语法
  1. Math.E

实例

返回 Euler 数:

  1. <html>
  2. <body>
  3. <script type="text/javascript">
  4. document.write("Euler's number: " + Math.E);
  5. </script>
  6. </body>
  7. </html>

输出:

  1. Euler's number: 2.718281828459045

分类导航