Undefined: Null: Boolean: Number: Reference: string: Array: Object: Function: |
All value types occupy a fixed size in memory and come and go as functions are called and return. Reference types are garbage collected. They are created with the keywork "new" when calling a constructor function (more about that later) or for objects, arrays, and strings can be created from literals. Reference types live in a JavaScript managed heap.