3 ms·
> It's rare that you are actually comparing two objects of different types Javascript is weakly typed, so it can be hard to say what types are involved in the
by nebulous1 9y ago
> It's rare that you are actually comparing two objects of different types
Javascript is weakly typed, so it can be hard to say what types are involved in the comparison. Using strict equality covers the case where the type isn't what you were expecting, circumventing unexpected behavior.
I also don't actually find it ugly.