JavaScript EXP

The JavaScript EXP function is one of the Math function which is used to calculate the power of E, Where E is Euler’s number approximately equal to 2.71828. In this article we will show you, How to use EXP() function in JavaScript Programming language with example.

Syntax of a JavaScript EXP Function

The basic syntax of the JavaScript EXP Function is as shown below:

Math.exp(number);

Number: It can be a number or a valid numerical expression and it represent the exponent value.

If the number argument is positive or negative number, EXP() function will return the output.

If the number argument is not a number, JavaScript EXP() function will return NaN.

and, if the number argument is Null, EXP() function will convert the Null value to Zero.

JavaScript EXP Function Example

The JavaScript EXP Function is used to calculate the power of Euler’s number E. In this example, We are going to check the same with different data types and display the output