← Back to archive

Stdle #31 · scope · 2026-07-01

What does this JavaScript snippet output?

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

function f(x) {
var x = x + 1;
return x;
}
console.log(f(10));
Scope
4 attempts left

Answer & explanation