What are the four promise combinators in JavaScript?
Promise.all (all must succeed, fast fail), Promise.allSettled (all settle, never rejects), Promise.race (first to settle wins), Promise.any (first to fulfill wins, AggregateError if all reject).
Verify This Answer
Cross-check this information using these trusted sources:
More FAQs in Promise.all, allSettled, race, and any: A Complete Guide
Promise.all rejects if any promise rejects (fast fail). Promise.allSettled waits for all promises, even if some reject, and returns an array of { status, value/reason } objects. Use allSettled for partial success.
Promise.race returns the first promise to settle (fulfilled or rejected). Promise.any returns the first promise to fulfill (ignores rejections until all reject). race can reject on the first rejection; any only rejects if all reject.
An error type thrown by Promise.any when all promises reject. It has an errors property containing an array of all the individual rejection reasons. This lets you see why each promise failed.
Still have questions?
Browse all our FAQs or reach out to our support team
