title: Calling function with window scope explanation (0, function(){})()
body: <p>I am curious as to why this works:</p>
  
  <pre><code>var c = {
      d: function myFunc() {
          console.log(this === window);   
      }
  };
  var a = {
      b: function() {
          console.log(this === a);
          (0,c.d)();
          c.d();
      }
  };
  a.b();
  </code></pre>
  
  <p>Console output:</p>
  
  <pre><code>True
  True
  False
  </code></pre>
  
  <p>So it seems to be that <code>(0, c.d)()</code> is the same as <code>c.d.call(window)</code>, but I cannot seem to find much about why or how this works. Can anyone explain?</p>
  
  <p>From: <a href="http://code.google.com/p/closure-compiler/issues/detail?id=180&amp;q=status=Accepted&amp;colspec=ID%20Type%20Status%20Priority%20Component%20Owner%20Summary" rel="noreferrer">Closure Compiler Issues</a></p>
  
  <p>Fiddle: <a href="http://jsfiddle.net/wPWb4/2/" rel="noreferrer">http://jsfiddle.net/wPWb4/2/</a></p>