← Back to archive

Stdle #180 · erasure · 2026-12-03

What does this TypeScript snippet output?

A past puzzle — fully playable. 4 attempts, hints on wrong guesses.

class P { constructor(public id: number) {} }
console.log(new P(7).id)
Type Erasure
4 attempts left

Answer & explanation