← Back to archive

Stdle #85 · modern · 2026-08-30

What does this TypeScript snippet output?

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

const o = { x: 1, y: 2 } as const;
const k = "z" as keyof typeof o;
console.log(o[k]);
Modern
4 attempts left

Answer & explanation