title: anonymous function syntax difference
body: <p>I am a little confused about anonymous function syntax. I tried to search the similar discussion but I dont know which keyword should I type.</p>
  
  <p>case 1: missing () before function</p>
  
  <pre><code>example1: function() {
    var a = 1, b = 2;
    return a + b;
  }();
  </code></pre>
  
  <p>case 2: standard anonymous function</p>
  
  <pre><code>example2: (function() {
    var a = 2, b = 3;
    return a + b;
  })();
  </code></pre>
  
  <p>when I execute two functions like this:</p>
  
  <pre><code>xxx.example1  // show 3
  </code></pre>
  
  <p>and</p>
  
  <pre><code>xxx.example2  // show 5
  </code></pre>
  
  <p>Both of them will show correct values. What are they different?</p>