JavaScript: `var x = (function() {... return something;})();` vs `var x; {... x = something;}`
<p>Are following snippets exactly equal? If no what is the deference?</p>

<pre><code>var x = (function() {
    ... //a
    return function(){
        ... //b
    };
})();
</code></pre>

<p>vs.</p>

<pre><code>var x;
{
    ... //a
    x = function(){
        ... //b
    };
}
</code></pre>
