Lab

How async/await Works Internally

advanced
1/10

Step Explanation

Understand what is happening first

1/10

Execution Visualizer

Watch memory, stack, queues, and output

Execution Visualizer

live
JavaScript stores fetchData in memory. Because it is async, calling it always returns a Promise.

Call Stack

1 frame
TOP ↑
global()
frame 0
↓ BOTTOM
Global Context

Memory

1 variable

Heap Memory

fetchDatafn→ refnew
"async function"
Console Output

awaiting output...

varfnobjarrclosure

Code Preview

Active line 1

Code

line 1
JavaScript
Tap Expand to view full code

1/10