How to use Infinity Property in JavaScript
This article describe about Infinity Property in JavaScript.
Infinity Property in JavaScript
Infinity property work on the numeric value and represent positive infinity.
-Infinity property also work on the numeric value that represent negative infinity.
Infinity property occur when number exceeds the upper limit of the floating point number, for ex 2.7976931348623157E+1030.
-Infinity property occur when number exceeds the lower limit of the floating point number, for ex 2.7976931348623157E+1030.
Example
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var x = 2.7976931348623157E+1030;
document.write(x + "<br />");
var y = -2.7976931348623157E+1030;
document.write(y);
</script>
</body>
</html>
|
Output

You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here