Question · JavaScript and React course · Module 16: Error Handling and Suspense
Promise.allSettled vs Promise.all
How does Promise.allSettled differ from Promise.all?
Answer options
- Promise.all returns an array, while Promise.allSettled returns an object
- Promise.allSettled waits for all results (success or error), while Promise.all aborts on the first error
- Promise.allSettled is faster than Promise.all
- Promise.allSettled only works with async/await
You can check the correct answer by solving this task in the CodeWorlds game.