老师习题上说是undefined,为啥我的结果是Children
class Person {
color = 'red';
constructor(name) {
this.name = name;
}
static pShow() {
console.log(this.name);
}
}
class Children extends Person{
constructor(name) {
super(name);
}
static cShow(){
super.pShow()
}
}
const p = new Children('lily');
Children.cShow();
14
收起
正在回答 回答被采纳积分+1
1回答





恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星