Memory Management
We'll now move our attention to another core aspect of a computer's hardware – its memory. Memory management is an important, but often overlooked, aspect of developing software in JavaScript. Memory management simply refers to the allocation, use, and deallocation of system memory for the various data structures that make up our programs.
There are two main approaches that are used by different programming languages to handle memory management: explicit allocation and deallocation and automatic allocation and deallocation. When writing software in an explicit memory management language, such as C-like languages, it's the software developer's job to tell the compiler when to allocate memory and how much to allocate to the software at any given stage. The developer also has to decide when that memory is no longer needed and explicitly tell the compiler to deallocate it. This increases the workload for the developer and can lead to...