How to use Infinity Property in JavaScript

This article describe about Infinity Property in JavaScript.
  • 1702

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

pic4.jpg

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

Categories

More Articles

© 2018 DotNetHeaven. All rights reserved.