/

HTML / CSS / JavaScript Tutorial

JavaScript Math property: E

[this page | pdf | back links]

The E property (of the Math object) returns (Euler’s) constant, , i.e. the limit of  as  tends to plus infinity.

 

It has the following syntax:

 

Math.E

 

EXAMPLE:


HTML USED IN THIS EXAMPLE:
<!DOCTYPE html>
<html> <!-- Copyright (c) Nematrian Limited 2018 -->
<head>
<style>
table,th,tr,td {border: 1px solid black; border-collapse: collapse;}
</style>
</head>
<body>
<table>
<tr>
<th>Example</th>
<th>Resulting value of <code>x</code></th>
</tr>
<tr>
<td><code id="Example"></code></td>
<td><code id="Result"></code></td>
</tr>
</table>

<script>
document.getElementById("Example").innerHTML =
  'var x = Math.E;';
document.getElementById("Result").innerHTML = Math.E;
</script>

</body>
</html>


NAVIGATION LINKS
Contents | Prev | Next | JavaScript Numbers and Math


Desktop view | Switch to Mobile