Comment on Closures for class/module privacy considered harmfulparentComments−abecedarius13yOr another way without the global: function myModuleReally() { return [useMe, testMe]; } function myModule() { return myModuleReally()[0]; } It'd be nice if the programming environment gave us a "can opener" (not globally available) to open up closures we've made -- like http://gbracha.blogspot.com/2012/07/seeking-closure-in-mirro... -- but we can do plenty without it.
Comments
Or another way without the global:
It'd be nice if the programming environment gave us a "can opener" (not globally available) to open up closures we've made -- like http://gbracha.blogspot.com/2012/07/seeking-closure-in-mirro... -- but we can do plenty without it.