ES6 - POSITIVE_INFINITY



This is a special numeric value representing any value greater than Number.MAX_VALUE. This value is represented as "Infinity". It resembles an infinity in its mathematical behavior. For example, anything multiplied by POSITIVE_INFINITY is POSITIVE_INFINITY, and anything divided by POSITIVE_INFINITY is zero. As POSITIVE_INFINITY is a constant, it is a read-only property of Number.

Syntax

var val = Number.POSITIVE_INFINITY;

Example

var val = Number.POSITIVE_INFINITY;
console.log("Value of Number.POSITIVE_INFINITY : " + val );

Output

Value of Number.POSITIVE_INFINITY : Infinity
Advertisements