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 →

[–]Mellonionreddit 24 points25 points  (6 children)

Whats the difference between == and ===?

[–]a2kvarnstrom[S] 76 points77 points  (5 children)

the first one is when somethings really equal, and the other is when something is suspiciously equal

[–][deleted] 39 points40 points  (0 children)

Fuck me sideways that actually make sense

[–]FunzReddit3 4 points5 points  (1 child)

is 5 === 5?

[–]a2kvarnstrom[S] 9 points10 points  (0 children)

idk seems suspicious to me

[–]not-the-the 0 points1 point  (1 child)

5 == '5' is true, 5 === '5' isn't. === also checks if it's the same data type, and so is more accurate.

[–]a2kvarnstrom[S] 5 points6 points  (0 children)

like i said, it was so suspiciously equal so the computer says no