...

/

The Promise.race() Method

The Promise.race() Method

Learn how the Promise.race() method returns an appropriate response as soon as any promise settles.

While Promise.any() short-circuits after the first fulfilled promise, we may also want to short-circuit the operation based on the first settled promise, regardless of the outcome. In that case, we can use Promise.race().

Returning the fastest settling promise as soon as it settles

The Promise.race() method provides a ...

Access this course and 1400+ top-rated courses and projects.