">
赞
踩
class A {
constructor(name, age) {
this.name = name;
this.age = age;
}
}
class B extends A {
constructor(name,age,c) {
super(name, age);//放到第一位
this.c = c;
}
}
var b = new B("Tom", 20,1);
alert(b.c);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。