3 ms·
You're right, but just a fun edge-case to think about (in JS): NaN === NaN // -> false This check is sometimes used to check if a number is NaN.
by cprecioso 8y ago
You're right, but just a fun edge-case to think about (in JS):
NaN === NaN // -> false
This check is sometimes used to check if a number is NaN.
- andreareina 8y agoBetter to use `Number.isNaN()`
- royjacobs 8y agoSure, and there are cases where you may been reading from some volatile register or something. But that's why I mentioned that this is usually what you want, not always :)