A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-92.ts
1classBox{
2#secret=42;
3reveal(){returnObject.keys(this).length;}
4}
5console.log(newBox().reveal());
Classes
Answer & explanation
Console output
0
Why
A `#`-prefixed field is a true ECMAScript private: it lives in a separate internal slot, not as a string-keyed property, so reflection like Object.keys cannot see it. Unlike TS `private`, this hiding is real at runtime and enforced by the engine, not the compiler.