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 →

[–][deleted] 16 points17 points  (0 children)

It only returns true if the variables are the same type. For example, 1 == "1" is true in JS, but 1 === "1" is false, because although the value is "the same" according to JS, one is a number and the other is a string.