JavaScript | Math.E() function
The Math.E() is an inbuilt function in JavaScript which is used to get the value of ep, where p is any given number. The number e is a mathematical constant having an approximate value equal to 2.718.
It was discovered by the Swiss mathematician Jacob Bernoulli.
This number is also called Euler’s number.
Syntax:
Math.exp(p)
Parameter: This funcion accepts a sinlge parameter p is any number.
Return Value: It return the value of ep, where p is any given number as parameter.
Example:
Input : Math.exp(0)
Output : 1
Explanation: Here the value of parameter p is 0, So after putting the value 0 instead of p in ep then its value becomes 1.
Input : Math.exp(2)
Output : 7.38905609893065
Explanation: Here the value of parameter p is 2, So after putting the value 2 instead of p in ep then its value becomes 7.38905609893065.
Last updated
Was this helpful?