null == undefinedevaluates to
null + 1equals 1 but
undefined + 1equal
if(!null)evaluates to true and
if(null)evaluates to false but
null == falseevaluates to false.
I've read the specification and I know how the results are reached, I'm looking for the paradigms and reasons that dictate this being the specification. Some of these points, especially the second one, given the first, feel very inconsistent.
The Internet Exploder team did its best to copy JS exactly and they did a damn good job of it to the point that the inconsistencies were copied as well. When Netscape went to get JS standardized as ECMAScript MS was a part of it and basically said that they weren't allowed to change the standard because it would break old code (existing systems inertia). The inconsistencies were standardized and that was that.
Douglas Crockford had a very good series of talks about some of these issues
, and I will link to them as soon as I can find them again.
(You might also be interested to know that
NaN == NaN evaluates to