Infinity in Javascript
Javascript has a number type called “Infinity”. If you run “typeof” on Infinity, you get Number…
Infinity can be compared to itself and it returns true. Infinity is obtained by taking a number and dividing by 0. This obeys the rules of math.
Hence …
4 / 0 == Infinity
is true.