JavaScript (ES2026) reference · Math Methods and Constants
JavaScript Math.E Property
Euler's number, the base of natural logarithms, approximately 2.71828.
JavaScript (ES2026) Since ES1
Syntax
Math.E
Return value
2.718281828459045
Examples
console.log(Math.E, Math.log(Math.E));
Output
2.718281828459045 1
console.log((1 + 1 / 1e6) ** 1e6);
Output
2.7182804690957534
Version history
| Version | Change |
|---|---|
| JavaScript ES1 | Added |
Related
Math.exp()· Return e (about 2.718) raised to the given power, used for exponential growth, decay and probability formulas.Math.log()· Return the natural logarithm (base e) of a number; divide by Math.log(base) to get a logarithm in any base.Math.PI· The ratio of a circle's circumference to its diameter, approximately 3.14159.- JavaScript Math · tutorial
- JavaScript Numbers · tutorial