title: Difference between (function(){})(); and function(){}();
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/5938802/are-function-and-function-functionally-equal-i">Are &ldquo;(function ( ) { } ) ( )&rdquo; and &ldquo;(function ( ) { } ( ) )&rdquo; functionally equal in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>This is something I haven't quite figured out yet, but I have been using function(){}() just because my VIM syntax highlight screws up if I add the parenthesis, although I've seen (function(){})() around many times, maybe its an IE thing?</p>
  
  <p><strong>edit:</strong></p>
  
  <pre><code>var singleton = function() {
      // code
  }();
  
  var singleton = (function() {
      // code
  })();
  </code></pre>