← Back to archive

Stdle #17 · modern · 2026-06-23

What does this TypeScript snippet output?

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

const get = (x?: number): number => x ?? 0
console.log(get(0), get())
Modern
4 attempts left

Answer & explanation