A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-1.ts
1classA{name='A';id(){returnthis.name;}}
2classBextendsA{name='B';id(){returnsuper.id();}}
3console.log(newB().id());
Classes
Answer & explanation
Console output
B
Why
super.id() picks the parent`s method but leaves `this` bound to the current instance. So A.id() executes with `this` still the B object, and reads B`s own `name` field ("B"). super changes method lookup, never the receiver. That is a frequent point of confusion.