June 11, 2014
You all know this WAT movie from Gary Bernhardt... Summarized it is this:
undefined" and "null" are different... comparators. But what are they? Objects? Primitives? From outer space? null is an object, but undefined is... well, undefined. So they are different. But "==" does not do a comparison on the type, only on the value (implicit type conversion included). The following example also shows this:
And, usage of "===" is most of the times the right choice!
« Review of JAX 2014 Project Avatar at JavaOne 2014 »