# JavaScript Level 13: Runtime & Memory

> Level 13: Runtime & Memory of the LoWisa JavaScript course: Call Stack, Heap and Garbage Collection, References and Memory Behaviour, Finding Memory and Runtime Problems. 3 lessons and 9 ideas, each explained in one line.

Runtime & Memory is level 13 of 16 of the [LoWisa JavaScript course](/courses/javascript/). It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

## Call Stack, Heap and Garbage Collection

- **The call stack.** The **stack** holds the frames of every function currently running: and overflows when recursion never stops.
- **The heap.** Objects, arrays and closures live in the **heap**, the big memory area the engine manages for you.
- **Garbage collection.** The **garbage** collector frees objects nothing can reach anymore: you never free memory, you release references.

## References and Memory Behaviour

- **Reachability.** An object stays alive while any **reference** path leads to it: from a variable, a property, or a closure.
- **Accidental retention.** A forgotten listener or an ever-growing cache keeps objects **reachable** forever: the classic JavaScript memory leak.
- **WeakMap.** A **WeakMap** holds keys weakly: when nothing else references the key object, its entry can be collected.

## Finding Memory and Runtime Problems

- **Heap snapshots.** A heap **snapshot** lists every live object by type and size: compare two to see what grew and who holds it.
- **Timeline profiling.** A memory **timeline** that climbs across repeated actions and never falls after collection is a leak in motion.
- **Long tasks.** Any callback holding the thread past about fifty milliseconds is a **long** task the profiler will name for you.

## Before and after this level

- **Before:** [Level 12: Advanced Language Patterns](/courses/javascript/level-12-advanced-language-patterns/): Iterators and Generators, Symbols, Maps, Sets and Advanced Collections, Functional and Declarative Patterns.
- **Next:** [Level 14: Testing & Code Quality](/courses/javascript/level-14-testing-and-code-quality/): Unit and Integration Testing, Static Analysis and Linting, Designing Testable JavaScript.

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See [Checkpoints and flashcards](/help/checkpoints-and-flashcards/).

## Frequently asked questions

### What does JavaScript Level 13: Runtime & Memory cover?

Call Stack, Heap and Garbage Collection, References and Memory Behaviour, Finding Memory and Runtime Problems: 3 lessons and 9 ideas.

### What should I know before this level?

The level before it, Level 12: Advanced Language Patterns, which covers Iterators and Generators, Symbols, Maps, Sets and Advanced Collections, Functional and Declarative Patterns.

## Learn JavaScript on your phone

The first level is free. LoWisa is on Google Play and the App Store.

---

Source: https://lowisa.dev/courses/javascript/level-13-runtime-and-memory/ · Updated 2026-11-16
