Why two different memories? Is it a browser standard to have two different memories to manage?
- A Fixed memory (stack) - to store local variables, function calls and its arguments.
- A Dynamic memory (heap) - to store complex data structures, with longer lifetime and dynamically varying size.