Detecting if a Javascript variable is really undefined
<p>How can we differentiate between <code>var foo;</code> and <code>var foo=undefined;</code>?</p>

<p><code>typeof foo</code> will return for both "undefined" and <code>foo in window</code> will return for both true;</p>
