Create a negative infinity: - Javascript Number

Javascript examples for Number:NEGATIVE_INFINITY

Description

Create a negative 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 .  ja v  a  2 s.  com*/
    var n = (-Number.MAX_VALUE) * 2;
    document.getElementById("demo").innerHTML = n;
}
</script>

</body>
</html>

Related Tutorials