Last active
March 7, 2017 08:45
-
-
Save toddzebert/cee6d8b0475275be0f48d7dfef142bd3 to your computer and use it in GitHub Desktop.
Nested Async Callback example - check the console log
This file contains hidden or 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
// requires https://gist.github.com/toddzebert/ca9b735f1fbcd627ddfead4a87378adb | |
var data = { id: 4 }; | |
getAuth(data, function (res) { | |
data.auth = res; | |
getProfile(data, function (res) { | |
data.profile = res; | |
getFeed(data, function (res) { | |
data.feed = res; | |
console.log(data); // callback hell | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment