Number.POSITIVE_INFINITY

The value representing positive infinity.

Since ES1 Spec ↗

Syntax

Number.POSITIVE_INFINITY

Returns

number — The special value Infinity.

Examples

console.log(Number.POSITIVE_INFINITY === Infinity);
Output
true
console.log(1 / 0, Number.POSITIVE_INFINITY > Number.MAX_VALUE);
Output
Infinity true

Notes

Equal to the global `Infinity`. Any positive overflow or division of a positive number by zero yields this. It is greater than any finite number; `Infinity - Infinity` is NaN.

Browser & runtime support

EnvironmentSince version
chrome 1.0
firefox 1.0
safari 1.0
edge 12
node 0.10

See also