Object Oriented Programming - Use Inheritance So You Don't Repeat Yourself

function Animal() { };

Animal.prototype = {
  constructor: Animal, 
  describe: function() {
    console.log("My name is " + this.name);
  }
};

Please how is this a super type of Bird and Dog. What code or function connects it as a parent to Dog and Bird. Thanks

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.