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.
This is useful when you want to get results from every promise, even if some don't work.
Top comments (0)