How does JavaScript manage memory?
The question is about JavaScript
Answer:
JavaScript automatically manages this memory in a process it calls garbage collection. The engine will automatically find currently unreachable objects, that is, objects which we as programmers don’t have access to, and recover the memory resources from them. This allows the developer to ensure memory is reclaimed while handling object references in a manner such that memory leaks are impossible for all but the longest-running applications with complex and extensive sets of global variables or closures.