class A { constructor(name) { this.name = name } toString() { console.log("this is father A", this.name) } } class Ac extends A { constructor(name) { super(name) this.name = name + 'child' } toString() { super.toString() console.log("this is child Ac") } } const a = new Ac('test') a.toString()