Math.exp()
Math.exp(x) → number
Returns e^x, where e is Euler's number.
Returns e raised to the power of x, where e is Euler's number (approximately 2.718), the base of the natural logarithm.
Arguments
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| x | number | optional | — | The exponent. |
Returns
number
e raised to the power x.
Example
let e = Math.exp(1); // 2.718281828459045