slightly improve clarity on Promise.all()
This commit is contained in:
parent
29f0121b1c
commit
d43bdd28eb
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ let promise = Promise.all([...promises...]);
|
|||
|
||||
`Promise.all` takes an array of promises (it technically can be any iterable, but is usually an array) and returns a new promise.
|
||||
|
||||
The new promise resolves when all listed promises are settled, and the array of their results becomes its result.
|
||||
The new promise resolves when all listed promises are resolved, and the array of their results becomes its result.
|
||||
|
||||
For instance, the `Promise.all` below settles after 3 seconds, and then its result is an array `[1, 2, 3]`:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue