Created
February 2, 2014 09:09
-
-
Save marcusoftnet/8765064 to your computer and use it in GitHub Desktop.
Writing callbacks without loosing your mind
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
// 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