Skip to content

Instantly share code, notes, and snippets.

@AmrAbdulrahman
Last active January 25, 2016 17:40
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 AmrAbdulrahman/d1c90d8e7bac2427cbfc to your computer and use it in GitHub Desktop.
Save AmrAbdulrahman/d1c90d8e7bac2427cbfc to your computer and use it in GitHub Desktop.
async1(function() {
// do some stuff
async2(function(inputsFromAsync1) {
// do stuff that depends on inputsFromAsync1
async3(function(inputsFromAsync2) {
// do stuff that depends on inputsFromAsync2
async4(function(inputsFromAsync3) {
// more stuff that depends on inputsFromAsync3
// finally execute func5() that should "in time"
// get executed after all previous logic
func5();
});
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment