← Back to archive

Stdle #15 · scope · 2026-06-15

What does this JavaScript snippet output?

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

const { a = 1 } = { a: undefined };
const { b = 1 } = { b: null };
console.log(a, b);
Scope
4 attempts left

Answer & explanation