-
-
Save kepta/36a760d233e4d94213ce04d6eb00fbb1 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
.then(myVal => { | |
const promA = foo(myVal); | |
const promB = anotherPromMake(myVal); | |
return Promise.all([prom, anotherProm]) | |
}) | |
.then(([valA, valB]) => { // putting ES6 destructing to good use | |
console.log(valA, valB) // all the resolved values | |
return hungryFunc(valA, valB) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment