title: Javascript Inheritance Chain
body: <pre><code>function Student() {
  }
  
  Student.prototype.sayName = function() {
    console.log(this.name)
  }
  
  function EighthGrader(name) {
    this.name = name
    this.grade = 8
  }
  
  EighthGrader.prototype = Object.create(Student)
  
  const carl = new EighthGrader(&quot;carl&quot;)
  carl.sayName() // console.logs &quot;carl&quot; TypeError HERE
  carl.grade // 8
  </code></pre>
  <p>Why do I get a TypeError when I use Student as the argument for Object.create? I know it can be fixed using Student.prototype instead.</p>
  <p>I thought the sayName() method could still be accessed according to the prototype chain?</p>