Put in order · JavaScript and TypeScript course · Module 2: Functions, Arrays and Objects

Memory Management Cycle

Arrange the memory management stages for variables in JavaScript:

Items to put in order

  • Marked for removal (mark)
  • Memory usage during operations
  • Memory allocation during declaration
  • Memory release (sweep)
Show the answer

Correct order:

  1. Memory allocation during declaration
  2. Memory usage during operations
  3. Marked for removal (mark)
  4. Memory release (sweep)