Building Your Learning Module...
Getting things ready for you!
Find videos you like?
Save to resource drawer for future reference!
Promise.allSettled() is like a patient waiter! Unlike Promise.all() which stops at the first rejection, allSettled() waits for ALL promises to complete - whether they succeed or fail - and gives you all the results!
Promise.all() rejects immediately when ANY promise fails, so you lose results from successful promises. allSettled() gives you all results!See the difference in behavior
Fetch from multiple APIs, handle partial failures
Never rejects - waits for every promise to settle
Returns array with status and value/reason for each
{status: 'fulfilled', value}
{status: 'rejected', reason}