1class Dog { 2 constructor(name) { 3 this.name = name; 4 } 5} 6 7Dog.prototype.bark = function() { 8 console.log(`Woof I am ${this.name}`); 9}; 10 11const pet = new Dog("Mara"); 12 13pet.bark(); 14 15delete Dog.prototype.bark; 16 17pet.bark();
本题为“单选题”