Skip to main content

Promise.all vs allSettled vs any vs race

Choose a combinator for all required results, partial results, first success and first settlement. Does any combinator cancel work?

Official Reference

Model Answer & Explanation

all fulfills with input-ordered results or rejects when an input rejects. allSettled reports every outcome in input order. any fulfills on the first fulfillment or rejects with AggregateError if none fulfill. race follows the first settlement. None cancels the underlying operations.

Follow-up Interview Question · How do these four methods behave with an empty iterable?

Module Context & References

JavaScript · Runtime & browser theory Explain the event loop, promises, rate limiting and DOM event flow
Personal Notes · Markdown

Technologies & Interview Topics Covered

Switch between short-term interview tracks and long-term 80/20 engineering depth to practice JavaScript internals, React rendering and hooks, timed frontend machine coding UI challenges, MeetaPro FG300, Blind 75 & NeetCode 150 DSA patterns, Python & FastAPI APIs, PostgreSQL query optimization & MVCC, Redis caching, Applied AI RAG pipelines & evaluations, and distributed system design.