Enclosing js function between ()?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/423228/difference-between-function-and-function">Difference between (function(){})(); and function(){}();</a>  </p>
</blockquote>



<p>I have seen it a lot by google: </p>

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

<p>Why they enclose their function inside the parethesis?
Which is the difference between:</p>

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

<p>?</p>

<h1>Edit</h1>

<p>Ok the questions should have been this:</p>

<p>Why they enclose their code into this:</p>

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

<p>Instead to write the code directly into the js flow?<br>
Are there any benefits, different behaviour?</p>
