Mrs. Sari waits on three runners at once: all, allSettled, race or any decides when her ticket settles and what she gets, while late runners still arrive…
The key idea
All run together; they differ only in when they stop waiting
Try it in this playground
all: see the other runners keep going Promise.all has rejected, yet the egg and the tomato still come, for nobody.
allSettled: print all three outcomes ['fulfilled', 'rejected', 'fulfilled']: what worked is not lost.
race: beaten by a rejection The chilli fails first, so race rejects with it.
any: skipping the rejection any waits for the egg, the first to be fulfilled.