Skip to content

Instantly share code, notes, and snippets.

@marcusoftnet
Created February 2, 2014 09:09
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 marcusoftnet/8765064 to your computer and use it in GitHub Desktop.
Save marcusoftnet/8765064 to your computer and use it in GitHub Desktop.
Writing callbacks without loosing your mind
// First I write the call without parameters
doSomething();
// I then adds the parameters
doSomething(123);
// and the function is just another param...
doSomething(123, function(){});
// I then create two new lines between the curlies
doSomething(123, function(){
});
// And finally add the code for the callback
doSomething(123, function(){
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment