Although I agree with you in principle, in practice most of js devs never worry about such things. It's mostly library authors and such.
And there are cases where a != a, I think for NaN (not a number).
Fair enough. It makes sense for NaN, but languages like Rust and the various ML variants solve that by defining floating point numbers to not be a type where equality is a valid binary operation.