Why does second function declaration win even though I return before it?
<p>I have the following JavaScript code:</p>

<pre><code>(function() { 
    function f(){ alert(1); }
    return f();
    function f(){ alert(2); }
})();
</code></pre>

<p>Can you explain why the alert pops up with 2 and not 1?</p>

<p>Thanks,</p>
