JavaScript exp() method
- Previous Page E
- Next Page expm1()
- Go to Parent Level JavaScript Math Reference Manual
Definition and usage
exp()
The method returns Ex value, where E is the Euler number(approximately 2.7183),x Is the number passed to it.
Instance
Example 1
Returns Ex, where x is 1
Math.exp(1);
Example 2
Use the exp() method for different numbers:
var a = Math.exp(-1); var b = Math.exp(5); var c = Math.exp(10);
Syntax
Math.exp(x)
Parameter value
Parameter | Description |
---|---|
x | Required. Number. |
Technical details
Return value: | The value of e raised to the power of x. e represents the base of the natural logarithm, whose value is approximately 2.71828. |
---|---|
JavaScript Version: | ECMAScript 1 |
Browser Support
Method | Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|---|
exp() | Support | Support | Support | Support | Support |
Related Pages
Tutorial:JavaScript Math
- Previous Page E
- Next Page expm1()
- Go to Parent Level JavaScript Math Reference Manual