Created
September 11, 2011 05:29
-
-
Save pragmaticobjects/1209211 to your computer and use it in GitHub Desktop.
Another Closure
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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