JS Concurrency Visualizer

The Boys Goa Trip

Promise.all()

  • Waits for all promises to resolve.
  • If any promise rejects, it fails immediately.
  • Returns an array of resolved values (in input order).
  • Short-circuits on first rejection.
Hitesh

Value:-

Piyush

Value:-

Anirudh

Value:-

Akash

Value:-

Combined Promise Result

Status:

Value:

Promise.any()

  • Resolves as soon as the first promise resolves.
  • Ignores rejected promises until all reject.
  • If all promises reject, it throws an AggregateError.
  • Returns the first successful value.
Hitesh

Value:-

Piyush

Value:-

Anirudh

Value:-

Akash

Value:-

Combined Promise Result

Status:

Value:

Promise.race()

  • Settles as soon as the first promise settles.
  • Returns the first resolved or rejected result.
  • Does not wait for other promises.
  • Outcome depends purely on timing.
Hitesh

Value:-

Piyush

Value:-

Anirudh

Value:-

Akash

Value:-

Combined Promise Result

Status:

Value:

Promise.allSettled()

  • Waits for all promises to settle.
  • Never rejects.
  • Returns an array of result objects.
  • Each result contains: status + value/reason.
Hitesh

Value:-

Piyush

Value:-

Anirudh

Value:-

Akash

Value:-

Combined Promise Result

Status:

Value: