Number POSITIVE_INFINITY Property - Javascript Number

Javascript examples for Number:POSITIVE_INFINITY

Description

The POSITIVE_INFINITY property represents positive infinity.

The following code shows how to get the result of positive infinity:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {/*  w  w w .  j a v  a2s . c  o  m*/
    var n = (Number.MAX_VALUE) * 2;
    document.getElementById("demo").innerHTML = n;
}
</script>

</body>
</html>

Related Tutorials