Summary
The base of natural logarithms, e, approximately 2.718.
Property of Math |
|
|---|---|
| Implemented in | JavaScript 1.0 |
| ECMAScript Edition | ECMAScript 1st Edition |
Description
Because E is a static property of Math, you always use it as Math.E, rather than as a property of a Math object you created.
Examples
Example: Using Math.E
The following function returns e:
function getNapier() {
return Math.E
}
Mozilla Developer Network