JavaScript Quiz Practice
Active Recall Drill Session
← Exit SessionQuestion 1 of 1
mediumJavaScript
What does this log?
code
function makeAdders() {
const adders = [];
for (let i = 0; i < 3; i++) {
adders.push((n) => n + i);
}
return adders;
}
const [add0, add1, add2] = makeAdders();
console.log(add0(10), add1(10), add2(10));