DEV Community

Discussion on: New Features in ECMAScript 2021 (with code examples)

Collapse
 
faithfulojebiyi profile image
Faithful Ojebiyi

When you use Promise.any, your literally saying which ever promise resolves first. It would only throw an error if non resolves.

If you want to make sure all your promise resolves or you want to catch error when any of the promises is rejected you should use Promise.all instead