Home  >  Article  >  Web Front-end  >  JavaScript represents the property Math.E of the arithmetic constant e, which is the base of the natural logarithm.

JavaScript represents the property Math.E of the arithmetic constant e, which is the base of the natural logarithm.

黄舟
黄舟Original
2017-11-09 10:01:384632browse

Definition and usage

Math.E AttributesRepresents arithmeticConstante, which is the base of natural logarithms, and its value is approximately 2.71828.

Grammar

Math.E

Example

Return Euler number:

<script type="text/javascript">

document.write("Euler&#39;s number: " + Math.E);

</script>

Output:

Euler&#39;s number: 2.718281828459045

This is a Euler constant and a natural pair The base of a number, approximately 2.718.

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 represents the property Math.E of the arithmetic constant e, which is the base of the natural logarithm.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn