class Cat extends Animal{ / constructor(name) { super(name); } / say(){ return Hello, ${this.name}! } }
Hello, ${this.name}!
你分别试试写和不写,能不能正常调用子类的构造方法
试了可以,哈哈
Sign in to make a reply
_NuLLPoInT
class Cat extends Animal{ / constructor(name) { super(name); } / say(){ return
Hello, ${this.name}!
} }