3 ms·
I don't disagree; it was just the briefest example, which assumed that window was the scope -- couldn't really think of a reason I'd warrant an inner scope to h
by thezilch 14y ago
I don't disagree; it was just the briefest example, which assumed that window was the scope -- couldn't really think of a reason I'd warrant an inner scope to have uninitialized vars.
So, to the OP, you can always check that your var is a member of some object, including window. The typeof example is bad form.