JS Built-ins
NumberPOSITIVE_INFINITYbeginner

Number.POSITIVE_INFINITY β€” 1/0

πŸ“– Usage Example
// Represents positive infinity
Number.POSITIVE_INFINITY          // β†’ Infinity
1 / 0 === Number.POSITIVE_INFINITY   // β†’ true

Use Number.POSITIVE_INFINITY to represent or compare against positive infinity, such as when a computation overflows.

Producing POSITIVE_INFINITY

Dividing any positive number by 0 produces Infinity.

πŸ’‘ Hints (1)
  • β€’ In JavaScript, dividing a positive number by 0 gives `Infinity`.