-
-
Save joepie91/87d9270e5aed19ffee1897f8c47f734e to your computer and use it in GitHub Desktop.
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
function getExample() { | |
return Promise.try(() => { | |
return promiseA(…); | |
}).then((resultA) => { | |
return Promise.try(() => { | |
return promiseB(…); | |
}).then((resultB) => { | |
// now you have access to resultA *and* resultB | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment