title: Trivial Inheritance with JavaScript
body: <pre><code>function StringStream() {}
  StringStream.prototype = new Array();
  StringStream.prototype.toString = function(){ return this.join(''); };
  </code></pre>
  
  <p>Calling <code>new StringStream(1,2,3)</code> gives an empty array</p>
  
  <pre><code>x = new StringStream(1,2,3)
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>StringStream[0]
  __proto__: Array[0]
  </code></pre>
  
  <p>Can someone please explain why the superclass' (<code>Array</code>) constructor is not called?</p>