Promise.allSettled()

noun

say it: “PROM-is awl SET-uld” /ˈprɑmɪs ɔl ˈsɛtəld/

A method that waits until every promise in a list has finished, then gives back each one's result, whether it worked or failed.

What does Promise.allSettled() do in JavaScript?

Promise.allSettled() — A method returning results for every input after all have settled.

const results = await Promise.allSettled(requests);

In a sentence

  • “Promise.allSettled() gave me a list of results, each marked fulfilled or rejected.”
  • “With Promise.allSettled(), the dashboard showed four weather cards and one "couldn't load" card instead of failing completely.”

Level: Freelancer · More JavaScript terms at this level

Updated