Why do I need the parameters === and !== in JavaScript?

Why do I need the parameters === and !== in JavaScript?

  • Comments 1

While showing the content of MicrosoftAjax.debug.js in Lutz Roeder's fantastic .NET Reflector I got asked what the parameters === and !== in JavaScript are for (and unfortunately didn't have an answer :-( ). Well, as it turns out === and !== are Comparison Operators in JScript 5.6 and behave identically to the equality operators (== and !=) except no type conversion is done, and the types must be the same to be considered equal.
The details can be found in the article Comparison Operators (JScript 5.6) on MSDN.

Regards

Daniel

Leave a Comment
  • Please add 6 and 4 and type the answer here:
  • Post