Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Self invoking anonymous function
//of this will execute privately without exposing the variables to the global object and without polluting the global namespace.
(function(){
console.log("runs");
function test(){
//console
console.log("test");
}
test();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment