Memory in JS

Memory is where we store our data, and we can store it in a few separate ways. Variables serve as the "identifier" for a piece of data, and allow us to refer to data we have stored in a specific place within memory.

Memory however also has different contexts, and information can be stored in the global memory, available to all functions in a program, or it can be confined—or scoped—to local memory within a function call. Variables defined in local memory can only be accessed from within the context of that function, but not from outside of it.