Add Methods After Inheritance - Object Oriented Programming - Free Code Camp

preview_player
Показать описание
Рекомендации по теме
Комментарии
Автор

Excellent and somewhat tricky lesson Mr. Ian
function Animal() { }
Animal.prototype.eat = function() {console.log("nom nom nom"); };

function Dog() { }



Dog.prototype =
Dog.prototype.constructor = Dog;
Dog.prototype.bark = function() {
console.log("Woof!");
}




let beagle = new Dog();

zken
Автор

ok In this section actually we are applying what we learned in the last couple of checkpoints

priyojitsingha
visit shbcf.ru