exp() Math class method
JS Home <<
JS Reference <<
Math <<
exp()
Description
Returns the exponential value of a number - (Euler's constant and passed argument) Eargument.
- Like all class methods
exp()should be used on the class rather than an instance of the class.
Syntax
| Signature | Description |
|---|---|
Math.exp(value) | Returns the exponential value of a number - (Euler's constant and passed argument) Eargument. |
Parameters
| Parameter | Description |
|---|---|
value | The value you wish to find the exponential value of: |
Examples
The code below displays exp() usage.
// Store results in an array.
var expValues = new Array(5);
expValues[0] = Math.exp(-1);
expValues[1] = Math.exp(0);
expValues[2] = Math.exp('0.75');
expValues[3] = Math.exp('a string');
expValues[4] = Math.exp();
expValues[5] = Math.exp(null);
alert(expValues);
Related Tutorials
JavaScript Advanced Tutorials - Lesson 4 - Math
