Why is D undefined?
<p>D is declared after an immediately-invoked function expression.</p>

<p>I want to alert D in this function.  Oddly, the alert comes out as <code>undefined</code>. Why is this?</p>

<pre><code>(function() {
    alert(D);
})();
var D = 5;
</code></pre>
