Infinity is the value of the property key
the Global Object.
console.log( window["Infinity" ] === Infinity );
Infinity is a literal value. For example, you can write
let x = Infinity;
Infinity is typically returned when divide by zero.
console.log( 1/0 === Infinity );
Infinity is number.
console.log( typeof Infinity === "number" );
Infinity === Infinity return
console.log( Infinity === Infinity );
To test if a value is finite, use Number.isFinite .