Promise.all([ promise_1, promise_2 ]).then((values) => {
// all input Promises resolved
}).catch((reason) => {
// one of input Promises rejected
});
Associated Context | |
---|---|
Type | Code Snippet ( .js ) |
Associated Tags | promise pieces javascript collection es6-promise javascript |
📝 Custom Description | Takes an array of promises as an input and gets resolved when all the promises get resolved or any of them gets rejected. From The Pieces JavaScript Collection. |
Related Links | https://www.freecodecamp.org/news/promise-all-in-javascript-with-example-6c8c5aea3e32/ https://code.pieces.app/collections/javascript https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all https://www.javascripttutorial.net/es6/javascript-promise-all/ |
Related People | Pieces Team, Davide Ladisa |
Sensitive Information | No Sensitive Information Detected |
Shareable Link | https://davideladisa.pieces.cloud/?p=2d24499f4b |