Address
-
The address of a variable is the memory location of the data.
-
However, React.js will automatically allocate memory and store a reference to the location in memory when values are initially declared and free it when they are not used anymore (garbage collection) (Memory Management - JavaScript | MDN, n.d.).
-
Garbage collection (GC) – a form of automatic memory management to monitor memory allocation and determine when a block of allocated memory is no longer needed and reclaim it (Memory Management - JavaScript | MDN, n.d.).
-
Developers can’t directly manage the actual memory addresses.
-
JavaScript with the library React abstracts away the details of memory addresses, focusing on references instead. This design simplifies development and helps prevent memory management errors.