Skip to content

Commit fc3f811

Browse files
authored
Merge pull request #2399 from joaquinelio/patch-2
Give me five
2 parents a43c18f + 5a14316 commit fc3f811

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/11-async/05-promise-api/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,15 @@ In practice, this method is almost never used.
309309
310310
## Summary
311311
312-
There are 5 static methods of `Promise` class:
312+
There are 6 static methods of `Promise` class:
313313
314314
1. `Promise.all(promises)` -- waits for all promises to resolve and returns an array of their results. If any of the given promises rejects, it becomes the error of `Promise.all`, and all other results are ignored.
315315
2. `Promise.allSettled(promises)` (recently added method) -- waits for all promises to settle and returns their results as an array of objects with:
316316
- `status`: `"fulfilled"` or `"rejected"`
317317
- `value` (if fulfilled) or `reason` (if rejected).
318318
3. `Promise.race(promises)` -- waits for the first promise to settle, and its result/error becomes the outcome.
319-
4. `Promise.any(promises)` -- waits for the first promise to fulfill, and its result becomes the outcome. If all of the given promises are rejected, [`AggregateError`](mdn:js/AggregateError) becomes the error of `Promise.any`.
319+
4. `Promise.any(promises)` (recently added method) -- waits for the first promise to fulfill, and its result becomes the outcome. If all of the given promises are rejected, [`AggregateError`](mdn:js/AggregateError) becomes the error of `Promise.any`.
320320
5. `Promise.resolve(value)` -- makes a resolved promise with the given value.
321321
6. `Promise.reject(error)` -- makes a rejected promise with the given error.
322322
323-
Of these five, `Promise.all` is probably the most common in practice.
323+
Of all these, `Promise.all` is probably the most common in practice.

0 commit comments

Comments
 (0)