title: Javascript `new` keyword on function returning array
body: <p>I was experimenting with the <code>new</code> keyword and I can't find an explanation for this behavior.
  Let's say we have a function returning an integer:</p>
  
  <p>(In firebug)</p>
  
  <pre><code>&gt;&gt;&gt; function x() { return 2; }
  &gt;&gt;&gt; x()
  2
  &gt;&gt;&gt; new x()
  x { }
  </code></pre>
  
  <p>But if the function returns an array :</p>
  
  <pre><code>&gt;&gt;&gt; function y() { return [2]; }
  &gt;&gt;&gt; y()
  [2]
  &gt;&gt;&gt; new y()
  [2]
  </code></pre>
  
  <p>Why is that ?</p>