wiki/content/20201111094957-executing_promises_in_parallel.md

18 lines
283 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-30 17:34:11 +00:00
date: 2020-11-11
2024-05-06 20:40:05 +00:00
id: 9c42715a-8324-4570-ab92-927b608aa02a
title: Executing Promises in Parallel
---
``` javascript
Promise.all([
asyncFunc1(),
asyncFunc2(),
])
.then(([result1, result2]) => {
})
.catch(err => {
// Receives first rejection among the Promises
});
```