← Back to archive

Stdle #66 · scope · 2026-08-05

What does this JavaScript snippet output?

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

let n = 100;
function f(x = n) { let n = 5; return x; }
console.log(f());
Scope
4 attempts left

Answer & explanation