Home > Web Front-end > JS Tutorial > 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.

黄舟
Release: 2017-11-09 10:01:38
Original
4729 people have browsed it

Definition and usage

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

Grammar

Math.E
Copy after login

Example

Return Euler number:

<script type="text/javascript">

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

</script>
Copy after login

Output:

Euler&#39;s number: 2.718281828459045
Copy after login

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>
Copy after login

This will produce the following results:

Property Value is : 2.718281828459045
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template