title: Problems inheriting properties from a supertype
body: <p>I'm creating an <code>Animal</code> supertype constructor which has a method that should be available for all 'bird' and 'cat' objects.</p>
  <ul>
  <li>How should I add this prototype to make sure I don't overwrite the subtypes' prototype?</li>
  <li>Can I use a subtype prototype's variable in the supertype prototype?</li>
  </ul>
  <p><strong>Example</strong></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 Animal() { }
  
  Animal.prototype = {
    constructor: Animal,
    say: function(sound) {
      console.log(`${sound}`);
    }
  };
  
  function Cat(name) {
    this.name=name
   }
  function Bird(name) {
    this.name=name
   }
  Cat.prototype = {
    constructor:Bird,
    sound:'meow'
  }
  Bird.prototype = {
    constructor:Bird,
    sound:'Bach Op1 D minor'
  }
  
  Cat.prototype = Object.create(Animal.prototype)
  Bird.prototype = Object.create(Animal.prototype)
  //is this overwriting the prototype already set?
  let myCat = new Cat("rupert")
  console.log(myCat.name, myCat.say(), Cat.prototype)</code></pre>
  </div>
  </div>
  </p>