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
Wrap all promises in a new Promise and attach resolve/reject handlers to each one. The first promise to settle (fulfill or reject) triggers the outer promise, making it a race to the finish.
Since Promise.resolve/reject can only be called once, the first promise to settle wins and all subsequent settlements are ignored.
Updated Feb 2026