The exp(x)
method returns the value of Ex,
where E is Euler's number (approximately 2.7183).
exp() |
Yes | Yes | Yes | Yes | Yes |
Math.exp(x);
x - A number.
A Number, representing Ex.
<!DOCTYPE html>
<html>
<body>
<button onclick="myFunction()">test</button>
<p id="demo"></p>
<script>
function myFunction() {<!--from w w w. j a va 2 s. co m-->
document.getElementById("demo").innerHTML = Math.exp(1);
}
</script>
</body>
</html>
The code above is rendered as follows: