title: Accessing ES6 super properties
body: <p>So I was messing around with ES6 classes when I saw something surprising:</p>
  
  <pre><code>class Animal {
      constructor(name) {
          this.name = name;
      }
      speak(sound) {
          console.log(sound);
      }
  }
  
  class Dog extends Animal {
      constructor(name, age) {
          super(name);
          this.age = age;
      }
      speak() {
          super.speak("Woof! I'm " + super.name + " and am " + this.age);
      }
  }
  </code></pre>
  
  <p>Then, I created my dog:</p>
  
  <pre><code>var mydog = new Dog("mydog",3);
  mydog.speak();
  </code></pre>
  
  <p>Now this prints</p>
  
  <pre class="lang-none prettyprint-override"><code>Woof! I'm undefined and am 3
  </code></pre>
  
  <p>So my question is, why is <code>super.name</code> undefined? I'm expecting it to be <code>mydog</code> in this case.</p>