3 ms·
Javascript has a lot of weird type coercion behavior, but it's not actually hard to avoid. "Never use ==" and "don't use operators on things if it's not obvious
by cipheredStones 4y ago
Javascript has a lot of weird type coercion behavior, but it's not actually hard to avoid. "Never use ==" and "don't use operators on things if it's not obvious what they would do" gets you pretty much everything you need there.
This is not to say that there's nothing else weird going on in Javascript, but the things people show off most as "wow, isn't this weird?!" aren't that consequential.