← Back to archive

Stdle #139 · coercion · 2026-10-17

What does this JavaScript snippet output?

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

const o = { [Symbol.toPrimitive](h) { return h } }
console.log(`${o}`, o + 0, +o)
Coercion
4 attempts left

Answer & explanation