Promise All Behavior
Multiple Choice Medium
Question
What happens if one Promise in Promise.all rejects?
Hint
Promise.all fails fast on rejection.
Explanation
If any Promise in Promise.all rejects, the entire Promise.all immediately rejects with that reason (fail-fast). It does not wait for the other Promises. If all Promises fulfill, Promise.all fulfills with an array of results in the same order. For waiting on all regardless of rejection, use Promise.allSettled which never rejects.
Related Resources
Related Lessons
- Async JavaScript
Learn async JS.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.