-
Primitive type values: The values are directly stored in the
stack
along with the name as reference.string
number
boolean
null
undefined
symbol
bigint
-
Reference type values: The values are stored in
heap
first, then reference of the heap along with the variable name would be stored instack
.Objects
Arrays
Functions
Dates
Times
etc..