The following shows that
>>> "0" == false
>>> false == "0"
>>> if ("0") console.log("ha")
The reason is because when you explicitly do
"0" == false, both sides are being converted to numbers, and then the comparison is performed.
When you do:
if ("0") console.log("ha"), the string value is being tested. Any non-empty string is
true, while an empty string is
(From Comparison Operators in Mozilla Developer Network)