DEV Community

Diwakar Verma
Diwakar Verma

Posted on

Understanding Promise.allSettled() in JavaScript

What is Promise.allSettled()?
Promise.allSettled() helps you handle multiple promises at once. Unlike Promise.all(), it doesnโ€™t stop if one promise fails. Instead, it waits for all promises to finish, whether they succeed or fail this is what actually a Promise.allsettled means.
Image description

This is useful when you want to get results from every promise, even if some don't work.

Top comments (0)