Self-executing function syntax and callback sytnax explained
<p>bit of a silly question perhaps.</p>

<p>But I want to understand why the syntax on the self-executing function and the callback it has is so different to all the other JS syntax..</p>

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

<p>I just need to understand why its valid to encapsulate it with <code>()</code> I wouldn't have guessed that to be valid, and then the extra <code>()</code> afterwards for the callback, (which just sits directly after it, I also wouldn't have expected that to be valid. </p>

<p>Is anyone able to explain this to me?</p>
