Math.E
Euler's number, the base of natural logarithms, approximately 2.71828.
Syntax
Math.E Returns
number — Approximately 2.718281828459045.
Examples
console.log(Math.E);
Output
2.718281828459045
console.log(Math.log(Math.E));
Output
1
Notes
A read-only constant. `Math.exp(1)` equals this value, and `Math.log` is its
inverse (base e).
Browser & runtime support
| Environment | Since version |
|---|---|
| chrome | 1.0 |
| firefox | 1.0 |
| safari | 1.0 |
| edge | 12 |
| node | 0.10 |