# .cadoles-slide-title[Modèle objet (3/4)] **Héritage** ```js function Animal() { this.nom = ''; } Animal.prototype.donnerNom = function(nom) { this.nom = nom; }; var a = new Animal(); a.donnerNom('...'); function Chien() { // On applique le constructeur d'Animal sur l'instance Animal.call(this); } // On créait un nouvel objet prototype à partir de celui d'Animal Chien.prototype = Object.create(Animal.prototype); Chien.prototype.aboyer = function() { console.log('Wouf !'); }; var c = new Chien(); c.donnerNom('Beethoven'); console.log(c.nom); c.aboyer(); ```