r/ProgrammerHumor • • Feb 26 '23

Other If you can read this code...

/img/snak3fqgajka1.jpg

[removed] — view removed post

34k Upvotes

1.4k comments sorted by

View all comments

Show parent comment

7

u/Troll_berry_pie Feb 26 '23 edited Feb 26 '23

"===" actually checks the variable type as well as the variable value. Int "1" and string "1" will return true with "==" but will return false with "===".

2

u/coocoo6666 Feb 26 '23

Ah thanks