Difference between these javascript functions
<p>Difference between the two functions:</p>

<pre><code>(function($){
  console.log($);
}("test"));

(function($){
  console.log($);
})("test");
</code></pre>

<p>I've tried it out on the web console and pressed 'Run'. They return the same thing. What exactly is the difference with the change of parenthesis location?</p>

<p>I am assuming that the second one is run immediately, right?</p>
