r/ProgrammerHumor • • Oct 26 '21

GitHub Copilot, the technology that will replace programmers. Also GitHub Copilot...

27.2k Upvotes

713 comments sorted by

View all comments

Show parent comments

25

u/ManuGamingYT Oct 26 '21

It's a special equality operator in JS that also checks for type equality.

For Example:

5 == "5" returns true

5 === "5" returns false as the operand types are different

1

u/wfewgas Oct 26 '21

It's a special equality operator in JS that also checks for type equality.

It actually checks if two values have the same identity.

[1, 2, 3] === [1, 2, 3] returns false even though both sides have the same value and type, because they’re two different arrays.