The be-all and end-all advice about Javascript (non) strict equals

Jun 13, 2021


This is another post about Javascript strict equal (===) and non-strict equal (==). However, unlike the other million of posts about the exact same topic, this one will tell you exactly when you must use each of them.

People who use non-strict equals are more likely to get fired and have no friends.

You should exactly never use non-strict equal.

You should always use strict equal instead.

There is never one single situation in which non-strict is more accurate, more readable or more predictable.

Prove me wrong in the comments, if you dare.