A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-54.ts
1abstractclassAnimal{
2abstractsound():string;
3describe(){return'says '+this.sound();}
4}
5classCatextendsAnimal{sound(){return'meow';}}
6console.log(newCat().describe());
Classes
Answer & explanation
Console output
says meow
Why
An abstract method has no body and emits nothing, but the base class can still reference it: at runtime `this.sound()` is a normal dynamic dispatch up the prototype chain to whatever the actual instance provides. The abstract declaration only guarantees, at compile time, that every concrete subclass supplies the method. This is the template-method pattern enforced by the type checker.