← Back to archive

Stdle #137 · modern · 2026-10-21

What does this TypeScript snippet output?

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

const it: IterableIterator<number> = [1, 2, 3].values()
console.log(it.next().value + it.next().value)
Modern
4 attempts left

Answer & explanation