Latest

recent

JavaScript POSITIVE_INFINITY Property

Definition and Usage

The POSITIVE_INFINITY property represents a value greater than Number.MAX_VALUE.
This value is represented as "Infinity".

Syntax

Number.POSITIVE_INFINITY;


Example

<script type="text/javascript">
var x=(Number.MAX_VALUE)*2
if (x==Number.POSITIVE_INFINITY)
  {
  document.write("Value of x: " + x);
  }
</script>

The output of the code above will be:

Value of x: Infinity
JavaScript POSITIVE_INFINITY Property Reviewed by 1000sourcecodes on 22:59 Rating: 5
Powered by Blogger.