const animal = {
sound: "Generic sound",
makeSound() {
return this.sound;
}
};
const dog = Object.freeze(Object.create(animal));
dog.sound = "Bark";
const result = dog.makeSound();
console.log(result);
Post #1708
6.5K
CHALLENGE ❓
- 👍 10
- ❤ 8