Skip to content

Instantly share code, notes, and snippets.

@joepie91

joepie91/.js Secret

Created July 27, 2016 12:44
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 joepie91/87d9270e5aed19ffee1897f8c47f734e to your computer and use it in GitHub Desktop.
Save joepie91/87d9270e5aed19ffee1897f8c47f734e to your computer and use it in GitHub Desktop.
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