title: Javascript inheritance call and apply
body: <p>I have been trying to get this to work for some time now and keeps giving me undefined.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function A(first, last){
    this.first = first;
    this.last = last;
  }
  
  A.prototype.concat = function(){
    return this.last + this.first;
  }
  
  function B(first, last){
    A.call(this, first, last);
    this.type = 'Long';
  }
  
  B.prototype.concat = function(){
    A.prototype.concat.apply(this, arguments);
  }
  
  var a = new B('A', 'B');
  console.log(a.concat());</code></pre>
  </div>
  </div>
  </p>
  
  <p>Can someone help me figure out what I am missing? If my concat method on A is accepting a parameter, then it works, but not without it.</p>