class Parent { constructor (name, age) { this.name = name this.age = age this.showName = function() { return this.name } show = () => { return 22 } showAge () { return this.age } } console.log(Parent.prototype) let p = new Parent('zhangli', '30') for(let key in Parent.prototype) { console.log(key) } class Child extends Parent { constructor (name, age) { super(name, age) } } let c = new Child('yueyue', 2) console.log(c.showAge())