Created
April 26, 2015 17:24
-
-
Save sheniff/30411ae336a70c3765cb to your computer and use it in GitHub Desktop.
Just a silly check... making sure a function declaration as "function XXX" keeps internal to the 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
| // closure | |
| (function() { | |
| function funcA() {} | |
| var funcB = function() {}; | |
| funcC = function() {}; | |
| })() | |
| console.log(typeof funcA); // undefined | |
| console.log(typeof funcB); // undefined | |
| console.log(typeof funcC); // function |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment