A past puzzle — fully playable. 4 attempts, hints on wrong guesses.
stdle-84.ts
1classP{constructor(x:number,publicy:number){}}
2console.log(Object.keys(newP(1,2)).join(','));
Classes
Answer & explanation
Console output
y
Why
Mixing a plain parameter with a parameter property is legal. x has no modifier, so it stays a local and produces no this.x. Only public y is promoted to an own enumerable property, so Object.keys returns just y.