Run to execute this JavaScript code for real (output appears here).
Size 0 / 4 · FIFO — values leave in the same order they arrived
Ready.
A queue is First-In-First-Out (FIFO): enqueue adds at the rear, dequeue removes from the front. This circular-array queue wraps the rear pointer around to reuse freed slots. Press Run (Ctrl + Enter) to animate, or Step forward (F10) to go one event at a time.
Step
1 / 49
Line (JavaScript)
—
No counted operations yet.
data = [null, null, null, null]