Math.exp( ) In JavaScript
The Math.exp() function in JavaScript is used to return ex, where x is the argument, and e is Euler’s number, which is the base of the natural logarithms.
exp() is a static method of Math, therefore, it is always used as Math.exp(), rather than as a method of a Math object created.
Syntax:
Math.exp(value)
Parameters Used: this function accepts a single parameter value is a number whose ex you want to find.
Returns: The Math.exp() function returns ex where e is Euler’s number and x is the argument.
Examples:
- When zero is passed as a parameter.
<scripttype="text/javascript">document.write("Output : " + Math.exp(0));</script>chevron_rightfilter_noneOutput:
Output : 1
- When “-1” is passed as a parameter.
<scripttype="text/javascript">document.write("Output : " + Math.exp(-1));</script>chevron_rightfilter_noneOutput:
Output : 0.36787944117144233
- When “1” is passed as a parameter.
<scripttype="text/javascript">document.write("Output : " + Math.exp(1));</script>chevron_rightfilter_noneOutput:
Output : 2.718281828459045
Supported Browsers: The browsers supported by JavaScript Math.exp( ) function are listed below:
- Google Chrome
- Internet Explorer
- Firefox
- Opera
- Safari
Recommended Posts:
- Introduction to JavaScript Course | Learn how to Build a task tracker using JavaScript
- How to compare two JavaScript array objects using jQuery/JavaScript ?
- JavaScript Course | Understanding Code Structure in JavaScript
- JavaScript Course | Conditional Operator in JavaScript
- JavaScript Course | Logical Operators in JavaScript
- JavaScript Course | Printing Hello World in JavaScript
- JavaScript Course | Data Types in JavaScript
- JavaScript Course | Variables in JavaScript
- JavaScript Course | Functions in JavaScript
- JavaScript Course | Loops in JavaScript
- JavaScript Course | Operators in JavaScript
- JavaScript Course | JavaScript Prompt Example
- JavaScript Course | Objects in JavaScript
- JavaScript vs Python : Can Python Overtop JavaScript by 2020?
- How to include a JavaScript file in another JavaScript file ?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

