I am trying to learn JS and With Respect to javascript closures I have a question -
function fooOuter(){
var a = 10;
var b = 20;
return function fooinner(x){
return a + b + x;
};
}
Does this mean that the inner functions in Javascript stores references to all the variables that lie in the same scope. i.e. In this this case, does fooinner store references of variables a and b.