Skip to content

Instantly share code, notes, and snippets.

@wtfil
Created May 4, 2015 10:38
Show Gist options
  • Save wtfil/46a265891017fa63fd70 to your computer and use it in GitHub Desktop.
Save wtfil/46a265891017fa63fd70 to your computer and use it in GitHub Desktop.
promises
// nested
callA().then(function () {
return callB().then(function () {
return callC()
});
});
// equivalent
callA().then(function () {
return callB();
}).then(function () {
return callC();
})
@lvivski
Copy link

lvivski commented May 11, 2015

callA().then(callB).then(callC)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment