class Person{
constructor(){
this.xx=xx;
this.yy=yy;
私有方法(){ }
}
共有方法(){ }
static zz=123; //类Person的静态属性
}
Person.zz=123;这样也可以给类Person添加静态属性
关于class的继承。子类是继承父类的所有属性和方法
class Child extends Father{
constructor(){
super()
}
}
子类继承父类的静态方法:把子类的__proto__指向父类本身