Computer >> Computer tutorials >  >> Programming >> Javascript

Number.POSITIVE_INFINITY in JavaScript


The Number.POSITIVE_INFINITY property of the Number object represents the positive infinity value.

Syntax

Its Syntax is as follows

Number.POSITIVE_INFINITY

Example

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var result = Number.POSITIVE_INFINITY;
      document.write("Positive infinity value: " + result);
   </script>
</body>
</html>

Output

Positive infinity value: Infinity