---
title: "Discussion on \"JavaScript Promises Unleashed: The Epic Battle of any vs race vs all!\" | Hashnode"
description: "Discussion on \"JavaScript Promises Unleashed: The Epic Battle of any vs race vs all!\". In short:\nPromise.all: Returns all resolved values or first rejected.\nPromise.any: Returns first resolved or aggregated all errors\nPromise.race: Returns first resolved or rejected\nExample1:\nconst promise1 = Promise.resolve(\"Hello\");\nconst promise2 = ..."
url: "https://hashnode.com/posts/javascript-promises-unleashed-the-epic-battle-of-any-vs-race-vs-all/64d87646f62fab2cfad1b351"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [JavaScript Promises Unleashed: The Epic Battle of any vs race vs all!](https://vkglobal.hashnode.dev/javascript-promises-unleashed-the-epic-battle-of-any-vs-race-vs-all?utm_source=hashnode&utm_medium=feed)

In short: Promise.all: Returns all resolved values or first rejected. Promise.any: Returns first resolved or aggregated all errors Promise.race: Returns first resolved or rejected Example1: const promise1 = Promise.resolve("Hello"); const promise2 = ...

Aug 13, 2023 · 2 min read · vkglobal.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#webdev](https://hashnode.com/tag/webdev)
-   [#angularjs](https://hashnode.com/tag/angularjs)
-   [#reactjs](https://hashnode.com/tag/reactjs)

## Written by

[Mahesh](https://hashnode.com/@urstrulyvishwak)

@urstrulyvishwak · India

  
[View profile](https://hashnode.com/@urstrulyvishwak)

Dad | Web developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
