Closure code not updating vars
tylermcginnis opened this issue · comments
Tyler McGinnis commented
var count = 0
function makeAdder(x) {
return function(y) {
return x + y;
};
}
var add5 = makeAdder(5);
count += add5(2)
A tool for visualizing Execution Context, Hoisting, Closures, and Scopes in JavaScript.
tylermcginnis opened this issue · comments
var count = 0
function makeAdder(x) {
return function(y) {
return x + y;
};
}
var add5 = makeAdder(5);
count += add5(2)