Math.exp() function returns
x is the argument, and
Euler's number (also known as Napier's constant), the
base of the natural logarithms.
The source for this interactive example is stored in a GitHub repository. If you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request.
- A number.
A number representing
Euler's number and
x is the
exp() is a static method of
Math, you always use it
Math.exp(), rather than as a method of a
Math object you
Math is not a constructor).
Math.exp(-1); // 0.36787944117144233 Math.exp(0); // 1 Math.exp(1); // 2.718281828459045
BCD tables only load in the browser