Last active
August 29, 2015 13:56
-
-
Save vanderlin/9147580 to your computer and use it in GitHub Desktop.
This file contains 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 GlobalClass = (function () { | |
var propA = 33; | |
var name = "Something"; | |
var callback; | |
return { | |
value:33, | |
stringvar:"some string", | |
sayThis: function(e) { | |
callback = e; | |
console.log(e); | |
if(typeof(e) == "function") { | |
e(); | |
} | |
}, | |
myFunction: function() { | |
console.log(name); | |
} | |
} | |
})(); | |
// now | |
GlobalClass.myFunction(); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment