← Back to archive

Stdle #106 · scope · 2026-09-14

What does this JavaScript snippet output?

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

function sum() {
let t = 0;
for (let i = 0; i < arguments.length; i++) t += arguments[i];
return t;
}
console.log(sum(1, 2, 3, 4));
Scope
4 attempts left

Answer & explanation