title: what's the function of parantheses in javascript?
body: <p>I know most of people using the following script like</p>
  
  <pre><code>(function(){})();
  </code></pre>
  
  <p>for anonymous function call. But what's the function of the surrounding parantheses?</p>
  
  <pre><code>var g = (); // syntax error, why?
  var g= (function(){}); // correct
  </code></pre>
  
  <p>Can anybody explain it for me?</p>