Skip to content

Instantly share code, notes, and snippets.

@pragmaticobjects
Created September 11, 2011 05:29
Show Gist options
  • Select an option

  • Save pragmaticobjects/1209211 to your computer and use it in GitHub Desktop.

Select an option

Save pragmaticobjects/1209211 to your computer and use it in GitHub Desktop.
Another Closure
var a = (function outer() {
var b = 0;
return function inner() {
var d = 10;
b = d + b + 1;
console.log(b);
};
})();
a();
a();
a();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment