← Back to archive

Stdle #78 · modern · 2026-08-23

What does this TypeScript snippet output?

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

class Point { constructor(public x = 1) {} }
const p = new Point(5)
const c = structuredClone(p)
console.log(c.x, c instanceof Point)
Modern
4 attempts left

Answer & explanation