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
Chain .then() calls to sequence dependent async operations: first fetch the user, then use the resolved user object to fetch their posts. Each .then() returns a new promise, enabling flat chaining instead of nesting. A single .catch() at the end handles errors from any step.
Each .then() callback receives the resolved value of the previous promise and returns a new promise. This creates a sequential pipeline where the output of one async step feeds into the next.
Updated Feb 2026