// base classclassA { name ='A';constructor() { log(this.name); }}// derived classclassBextendsA { name ='B'; // ๐ธ overridden class fieldsconstructor(){// โ `this` doesn't exist before `super()`super();log(this.name); }}newA(); // "A"newB(); // "A"โ, "B"
classA { name ='A';constructor() { // โญ๏ธ overridden class fields not fully initailized at this pointlog(this.name); }}classBextendsA { name ='B'; // โญ๏ธ overridden class field}newA(); // "A"newB(); // "A"โ