The Weird World of Infinity in JavaScript
You are probably aware that ECMAScript has something called
Infinity
, which is a numeric value that you can apply to any variable, the same way you can apply other numbers as values for variables.
Infinity
of course is not the same as other numbers, so I thought I’d summarize, with examples, many of the quirks and useful facts around JavaScript Infinity
and how it works.