Home >>JavaScript Math Reference >JavaScript E Property

JavaScript E Property

JavaScript E Property

JavaScript E property is used to return the Euler's number and the base of natural logarithms. It’s value is approximately 2.718.

Syntax:

Math.E

Browser Support

Property Chrome Edge Firefox Safari Opera
E Yes Yes Yes Yes Yes

Here is an example of JavaScript E property:

<html>
<body>
<p>Click the button to see the Output.</p>
<button onclick="myFunction()">Try it</button>
<p id="demo"></p>
<script>
function myFunction() {
  document.getElementById("demo").innerHTML = Math.E;
}
</script>
</body>
</html>
Output:

Click the button to see the Output.

 


No Sidebar ads