Skip to content

Instantly share code, notes, and snippets.

@jamischarles
Created June 19, 2011 12:20
Show Gist options
  • Save jamischarles/1034222 to your computer and use it in GitHub Desktop.
Save jamischarles/1034222 to your computer and use it in GitHub Desktop.
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