Understanding Promise.all vs Promise.allSettled

Asked by Jennifer Lee Sep 14, 2025 intermediate 954 views
56

I'm confused about when to use Promise.all() vs Promise.allSettled() in JavaScript.

From what I understand:

  • Promise.all() fails fast if any promise rejects
  • Promise.allSettled() waits for all promises

Can someone explain with practical examples when I should use each one? What are the pros and cons?

Solutions

0 answers

No solutions yet

Be the first to help solve this problem!