title: javascript inheritence why is property left out in some?
body: <p>why is <code>this.name = name;</code> in the  Penguin and Emperor classes  and why is <code>this.numLegs = numLegs;</code> left out? is it because you can can set those properties if it has it?</p>
  
  <pre><code>// original classes
  function Animal(name, numLegs) {
      this.name = name;
      this.numLegs = numLegs;
      this.isAlive = true;
  }
  function Penguin(name) {
      this.name = name;
      this.numLegs = 2;
  }
  function Emperor(name) {
      this.name = name;
      this.saying = "Waddle waddle";
  }
  
  // set up the prototype chain
  Penguin.prototype = new Animal();
  Emperor.prototype = new Penguin();
  
  var myEmperor = new Emperor("Jules");
  
  //console.log(myEmperor.saying); // should print "Waddle waddle"
  //console.log(myEmperor.numLegs); // should print 2
  //console.log(myEmperor.isAlive); // should print true
  console.log(myEmperor.name);
  </code></pre>