The original value | Reference value | |
---|---|---|
location | Simple segments of data stored on the stack, whose values are stored directly where variables are accessed. | An object stored in the heap, the value stored at the variable is a pointer to the memory where the object is stored. |
The data type | Undefined, NULL, Boolean, number, string | Object |