QuizNot attempted
Promise.any
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- An AggregateError whose .errors holds all reasons
Promise.anyrejects only when every input rejects, and then with anAggregateErrorwhose.errorslists all reasons in input order (an empty iterable rejects immediately).- Not the first or the last reason: a single reason would hide the others, so it aggregates them.
- Not 'never rejects': that is
allSettled.