← Back to archive

Stdle #124 · coercion · 2026-10-02

What does this JavaScript snippet output?

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

const a = { valueOf() { return 1 } }
console.log(a == 1, a == '1', a === 1)
Coercion
4 attempts left

Answer & explanation