Run to execute this JavaScript code for real (output appears here).
Ready.
Inserts a new node at a given position: walk to the node just before the position, point the new node at its successor, then re-link the predecessor to the new node. Press Run (Ctrl + Enter) to animate, or Step forward (F10) to go one event at a time.
Step
1 / 11
Line (JavaScript)
—
main (no active function frames)
No counted operations yet.
10 -> 20 -> 30 -> 40 -> null