JavaScript Math Object : exp()

The exp() method returns the value of EN, where N is the argument and E is Euler's constant, the base of the natural logarithm. Syntax :
  Math.exp( number );
Example :
<script>
  var x = 9;
  var y = Math.exp(x);
  document.write("exp(9) : " + y + "<br/>");
  var x = 2;
  var y = Math.exp(x);
  document.write("exp(2) : " + y + "<br/>");
  var x = -5;
  var y = Math.exp(x);
  document.write("exp(-5) : " + y + "<br/>");
</script>
Output :


Next Topic :