Explore Library
QuizAdvanced

Closures Capture Variables

Understand how a closure remembers variables from its outer scope.

In the code below, what does calling `counter()` twice in a row return? function makeCounter() { let count = 0; return function() { count++; return count; }; } const counter = makeCounter(); counter(); counter();