Skip to content

Instantly share code, notes, and snippets.

@jayfresh
Created December 12, 2013 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayfresh/7931182 to your computer and use it in GitHub Desktop.
Save jayfresh/7931182 to your computer and use it in GitHub Desktop.
var i = 1;
(function() {
var privateVar = i;
asyncFunc(variable, function() {
// all yo' callback stuff here
console.log(privateVar);
});
})(); // execute function immediately
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment