Skip to content

Instantly share code, notes, and snippets.

@mightyguava
Created March 12, 2017 18:39
Show Gist options
  • Save mightyguava/6301e3f718e24c67b44f4d9d4c5a8a93 to your computer and use it in GitHub Desktop.
Save mightyguava/6301e3f718e24c67b44f4d9d4c5a8a93 to your computer and use it in GitHub Desktop.
Demystifying Async Programming in Javascript - Callback Hell
getUserData(function doStuff(e, a) {
getMoreUserData(function doMoreStuff(e, b) {
getEvenMoreUserData(function doEvenMoreStuff(e, c) {
getYetMoreUserData(function doYetMoreStuff(e, c) {
console.log('Welcome to callback hell!');
});
});
});
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment