Computer >> Computer tutorials >  >> Programming >> Javascript

Math.exp() function in JavaScript


This function of the Math object accepts a number and returns the value of Ex, where x and E are argument and Euler's constants of the natural logarithms.

Syntax

Its Syntax is as follows

Math.exp(12)

Example

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Math.exp(12);
      document.write("Result: "+result);
   </script>
</body>
</html>

Output

Result: 162754.79141900392