Thanks. That's a good catch.
You should actually be using Number.isNan() over the global isNaN function which will give somewhat unexpected results in comparison to the newer method on the Number object. You should also use !Number.isFinite() instead of checking equality with Infinity.
Thanks. That's also a good tip.
I think equality is still good as long as we use triple equals.
Yes, you can still write it that way.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.