function Animal(name) {
this.name = name;
}
Animal.prototype.sound = 'Generic sound';
const dog = new Animal('Dog');
Animal.prototype.sound = 'Bark';
console.log(dog.sound);
Post #1786
6.34K
CHALLENGE
- 👍 3