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
Resolve with the first fulfilled promise value, ignoring rejections until all have failed. Track rejected count and store errors by index. Only reject with an AggregateError when every promise has rejected.
The first fulfillment short-circuits to resolve the outer promise, while rejections are silently collected. Only when all promises reject does the aggregate error surface.
Updated Feb 2026