Hello,
I want an explanatin on the following javascript code
var a = (function(y,x) {
var x = null;
return {
foo: function(x) {return this.bar(x*y);},
bar: function(x){return x + y;}
}
})(3,4);
console.log(a.foo(2));
Why does this code produces 9?
Thank you