← Back to archive

Stdle #70 · scope · 2026-08-09

What does this JavaScript snippet output?

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

function f(a = b, b = 1) { return a + b; }
try { console.log(f()); } catch (e) { console.log(e.constructor.name); }
Scope
4 attempts left

Answer & explanation