typeof foo['bar'] !== 'undefined' vs. 'bar' in foo
<p>What's the difference between the return values of these two expressions...</p>

<p>Expression 1: <code>typeof foo['bar'] !== 'undefined'</code></p>

<p>Expression 2: <code>'bar' in foo</code></p>

<p>... assuming that these conditions are met: </p>

<ol>
<li><code>foo</code> is an object,</li>
<li><code>foo</code> does not contain any properties that have the value <code>undefined</code> set explicitly.</li>
</ol>
