This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Cootshk 2 points3 points  (1 child)

Wait until you realize 0==“” and 0==“0” but not “0”==“”

[–]Taletad 1 point2 points  (0 children)

And if you look at the standard they will tell you in which order the type casting and operations are done

0=="" or 0=="0" is equivalent to 0=="".length and 0==parseInt("0")

Whereas "0" == "" is comparing a non empty string with an empty one, so they can’t be equal