Code
Loading editor...
Tap Analyze to see visualization
Click Analyze to visualize
See step-by-step execution, variables, and output
Variables
Run code to see variables
Output
Console output will appear here
Click Analyze to visualize
See step-by-step execution, variables, and output
Run code to see variables
Console output will appear here
Return a new Promise that never rejects early. For each input promise, attach both a then and catch handler that record the outcome as a {status, value} or {status, reason} object at the correct index. Use a counter to resolve the outer promise once all have settled.
By catching rejections locally and converting them into result objects, no single rejection can short-circuit the aggregation, guaranteeing all outcomes are collected.
Updated Mar 2026