Immediate functions and different declarative syntaxes
<p>Regarding immediate function in JS. What is the difference between this syntax</p>

<pre><code>(function() {}());
</code></pre>

<p>and</p>

<pre><code>(function() {})();
</code></pre>

<p>I especially do not understand the use of the last part <code>()</code> in the second example.</p>

<p>Could you provide me a quick explanation together with a sample of code on how to use an immediate function with this different syntax?</p>
