JavaScript math exp() method

The JavaScript math exp() method is used to get the exponential form of a number.
Syntax:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Math.exp(n)
Math.exp(n)
Math.exp(n)

Parameters
n: It represents the number whose exponential value has to be obtained.

Returns
Exponential value of a number

Example:

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.exp(0));
</script>
</body>
</html>
<!DOCTYPE html> <html> <body> <script> document.writeln(Math.exp(0)); </script> </body> </html>
<!DOCTYPE html>
<html>
<body>
<script>
document.writeln(Math.exp(0));
</script>
</body>
</html>