Loading challenge...
Preparing the challenge details...
Loading challenge...
Preparing the challenge details...
Implement Promise.all from scratch: resolve with an ordered results array when all settle, reject immediately on the first rejection.
Promise.all executes all promises concurrently and resolves with an array of results in input order. If any one rejects, the whole thing rejects immediately. The ordering detail is the trap: because promises settle at different times, you must write to the original index, not push.
Goal: Implement Promise.myAll with correct ordering and fail-fast rejection.
Continue learning with these related challenges
Implement the three Promise utility variants: allSettled (never rejects), race (first to settle wins), and any (first to resolve wins).
Implement your own Promise.all polyfill to understand how concurrent Promise handling works under the hood.
Implement a retry function that handles transient failures by retrying async operations with optional delays.
Implement the three Promise utility variants: allSettled (never rejects), race (first to settle wins), and any (first to resolve wins).
Implement your own Promise.all polyfill to understand how concurrent Promise handling works under the hood.
Implement a retry function that handles transient failures by retrying async operations with optional delays.