What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Promise.allSettled(iterable) returns a Promise that fulfills with an array of outcome objects after every input has settled. Each object has a status of "fulfilled" or "rejected", plus a value or reason, respectively. The array preserves the input order, not the order in which the operations finish.
What the returned value looks like
The method accepts an iterable, such as an array, and returns a Promise. Once all inputs have fulfilled or rejected, the returned Promise fulfills with an array containing one outcome object for each input. Promise resolution assimilates thenables, and ordinary non-promise values count as fulfilled inputs.
As an Amazon Associate I earn from qualifying purchases.
const results = await Promise.allSettled([
Promise.resolve("profile"),
Promise.reject(new Error("offline")),
]);
// results:
// [
// { status: "fulfilled", value: "profile" },
// { status: "rejected", reason: Error("offline") },
// ]
This is an array of outcome records, not an array filtered to contain only successful values. An input rejection appears in its record; it does not, by itself, reject the aggregate Promise.
Recommended Free Tools
The two status values and their properties
| Outcome | Object shape | Read this property |
|---|---|---|
| Fulfilled | { status: "fulfilled", value } |
value |
| Rejected | { status: "rejected", reason } |
reason |
Branch on status before reading the corresponding property. For example:
#1 Best Overall
for (const result of results) {
if (result.status === "fulfilled") {
console.log("Value:", result.value);
} else {
console.error("Reason:", result.reason);
}
}
Results follow input order, not completion order
The result at index i corresponds to the input at index i, even if that operation finishes after later inputs. The aggregate waits until every outcome is known, then provides the records in the order the inputs were passed. That positional relationship makes it possible to associate results with the original inputs by index.
If you destructure or otherwise assign results to named variables, keep that assignment order aligned with the input order; a mismatch can associate an outcome with the wrong task.
Rank #2
What happens with an empty iterable or settled inputs
An empty iterable produces a Promise that is already fulfilled with an empty array. With a non-empty iterable containing no pending promises, fulfillment still occurs asynchronously.
Free tools Windows power users keep installed
One-click scans. No signup required.
When to use allSettled() instead of all()
Use Promise.allSettled() when the tasks are independent and you need to inspect every success and failure, such as when gathering several optional results. Use Promise.all() when all inputs must succeed or an input rejection should reject the combined Promise. For its return shape and behavior, see MDN’s Promise.allSettled() reference; the algorithm is specified in ECMA-262, 15th edition (June 2024).
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




