Search This Blog

Monday, 1 August 2016

What is the largest possible number in javascript?

Html page:

<button onclick="myFunction()">Try it</button>
<p id="demo"></p>

Javascript page:

<script>
    function myFunction() {
        document.getElementById("demo").innerHTML = Number.MAX_VALUE;
    }
</script>

Output:

1.7976931348623157e+308

No comments:

Post a Comment