title: Javascript closure unexpected result
body: <p>The closure code is very short:</p>
  
  <pre><code>var fn = function() {
      return function() {
          console.log(arguments);
      }
  }
  
  (function(arg) {
      console.log('bar');
  })('foo');
  </code></pre>
  
  <p>Why <code>["foo"]</code> is printed instead of <code>bar</code>? If I comment out <code>var fn = ...</code> , the result is as expected and <code>bar</code> is printed. How can those 2 pieces of code be related?</p>