class Worker {
constructor() {
this.name = 'Tom';
}
}
class Python extends Worker {
constructor() {
super();
this.version = '3.8';
}
}
const w1 = new Python();
document.write('name' in w1);
document.write('<br />');
document.write('version' in w1);
/*
run:
true
true
*/