Core JavaScript 1.5 Reference:Global Objects:Math:E
From MDC
Contents |
[edit] Summary
Euler's constant and the base of natural logarithms, approximately 2.718.
| Property of Math | |
|
Static, Read-only |
|
| Implemented in: | JavaScript 1.0, NES 2.0 |
| ECMA Version: | ECMA-262 |
[edit] 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.
[edit] Examples
[edit] Example: Using Math.E
The following function returns Euler's constant:
function getEuler() {
return Math.E
}