← Back to archive

Stdle #132 · modern · 2026-10-16

What does this TypeScript snippet output?

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

const tag = Symbol.toPrimitive
const o = { [tag]() { return 42 } }
console.log(+o)
Modern
4 attempts left

Answer & explanation