JavaScript Math.exp()
Definition and Usage
The Math.exp() method returns the value of Ex, where E is Euler's number (approximately 2.7183) and x is the number passed to it.
More Examples
let a = Math.exp(1);
let b = Math.exp(-1);
let c = Math.exp(5);
let d = Math.exp(10);
Try it Yourself »
Browser Support
Math.exp()
is an ECMAScript1 (ES1) feature.
ES1 (JavaScript 1997) is fully supported in all browsers:
Chrome | IE | Edge | Firefox | Safari | Opera |
Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
Math.exp(x)
Parameters
Parameter | Description |
---|---|
x | Required. A number. |
Return Value
A number representing Ex. |