A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-175.ts
1classC{constructor(publicreadonlyx=1){}}
2constc=newC();
3Object.assign(c,{x:5});
4console.log(c.x);
Classes
Answer & explanation
Console output
5
Why
A public readonly parameter property emits a plain writable field; readonly only blocks reassignment in the type system. Object.assign performs ordinary [[Set]] operations, so it freely overwrites x with 5 at runtime.