JavaScript memory model

Node.js Variable Memory Simulator

Step through small JavaScript examples and watch primitive values, object references, stack frames, and heap objects change.

Primitive value Reference Heap object

Code

Call stack

bindings live here

Heap

objects live here

Conceptual memory table

not physical addresses
Area Name Kind Holds

Learning materials

What this simulator teaches

Use these notes as a companion to the scenarios. The visuals are conceptual: they explain observable JavaScript behavior, not exact V8 memory addresses.

In this scenario