class Stu { constructor(name, age) { this.name = name this.age = age } getAge() { return this.age } } let stu = new Stu('gl', 18) console.log(stu.getAge());
class Clert extends Stu { constructor(name, age, position) { super(name, age) this.position = position console.log('clert init'); } doPosition() { console.log('my position'); } }