Intermediate
JavaScript
Q51 / 100
What does Promise.all() do?
Correct! Well done.
Incorrect.
The correct answer is B) Resolves when all input Promises resolve; rejects immediately if any rejects
B
Correct Answer
Resolves when all input Promises resolve; rejects immediately if any rejects
Explanation
Promise.all([p1, p2, p3]) resolves with an array of results. If any promise rejects, the whole thing rejects. Use Promise.allSettled for no-fail behavior.
Progress
51/100