I was reading the MDN docs on JavaScript promises and realized that the difference between Promise.all
and Promise.allSettled
wasn’t immediately obvious.
From the docs linked above:
A
Promise
is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with an asynchronous action’s eventual success value or failure reason.
A Promise is in one of these states:
pending
: initial state, neither fulfilled nor rejected.
fulfilled
: meaning that the operation completed successfully.
rejected
: meaning that the operation failed.
#javascript #web-development