super相关的文章推荐

ES6中class方法及super关键字

记录下class中的原型,实例,super之间的关系,希望能够帮到大家! //父类class Dad { constructor(x, y) { this.x = 5; this.y = 1; this.state = 789 } static x = 521 state1 = 666 say() { console.log("父类bark"); } talk = () = { console.log("父类talk"); } static speak() { console.log("父类speak

11条记录