ES6 - math exp() Function



Equivalent to Math.pow(Math.E, x).

Syntax

Math.exp ( x ) ;   

Parameter

  • x − represents a number

Return Value

Returns the exponential value of the variable x.

Example

console.log("---Math.exp()---") 
console.log("Math.exp(1) : "+Math.exp(1)) 
console.log("Math.exp(5.5) : "+Math.exp(5.5))          

Output

---Math.exp()--- 
Math.exp(1) : 2.718281828459045 
Math.exp(5.5) : 244.69193226422036             
Advertisements