Math.exp method

The Math.exp method returns the number e (Euler's constant, its value is about 2.7) to the power of x.

Syntax

Math.exp(power);

Example

In this example, the number e is raised to the power of 3:

console.log(Math.exp(3));

The code execution result:

20.085536923187668

See also

  • the Math.E property
    that contains the exact value of the number e
  • the Math.pow method
    that raises a number to a given power
enru