HomePremium · ₹1199
← All questions

Promise.all and Promise.allSettled implementation

Medium
Was this asked in an interview?

Implement polyfills for Promise.all and Promise.allSettled.

Problem

Write your own myAll (rejects fast on first rejection, preserves order) and myAllSettled (never rejects, reports status of each).

Promise.all and Promise.allSettled implementation — JavaScript Interview Question | Mentoxis