JavaScript uses type coercion to automatically convert between different types of values. Sometimes, though, one wants to distinguish between "1"
and 1
, or between 1
and true
. That's the fundamental difference between ==
and ===
(and between !=
and !==
). Without that distinction (if, say, ===
was removed), one would have to jump through hoops to test type-and-value equality (and similarly with type-independent-value testing if the functionality of ==
were removed).
I hadn't heard about the Microsoft story. I suspect that it is bogus and would chalk it up to a tendency on the part of some people to blame Microsoft for every perceived evil. However, I would be very surprised if Microsoft, Mozilla, Google, Yahoo, almost any experienced JS programmer, etc. would be okay with the merger of ==
and ===
. It would indeed break a huge amount of code and would remove a very useful tool from the language.