Comment by wiseowise
> The question you should be asking is: why does it ever make sense to silently compare a character string to anything other than a character string?
Because this is how C does it.
> The question you should be asking is: why does it ever make sense to silently compare a character string to anything other than a character string?
Because this is how C does it.
Certainly "this is how C does it" might be the worst possible rationale for anything in this space. And I like C, got paid a whole lot of money to write C over many years.
But hilariously it's not even true, you see C believes the empty string is also true, it's a string, only the absence of a string would be false in C - whereas Javascript is quite sure the empty string, just like an undefined or null value, is false.