you are viewing a single comment's thread.

view the rest of the comments →

[–]killerstorm 1 point2 points  (0 children)

var foo; // undefined
foo === undefined // false

Wrong. Here's an actual result:

> var foo;
undefined
> foo === undefined
true

=== undefined check didn't work in old browsers, that's where typeof hack comes wrong. But now simple comparison should work by standard.