Variables, Scope, and Memory
WHAT’S IN THIS CHAPTER?
- Working with primitive and reference values in variables
- Understanding execution context
- Understanding garbage collection
PRIMITIVE AND REFERENCE VALUES
ECMAScript variables may contain two different types of data: primitive values and reference values. Primitive values are simple atomic pieces of data, while reference values are objects that may be made up of multiple values.