-
Primitive type values: The values are directly stored in the
stackalong with the name as reference.stringnumberbooleannullundefinedsymbolbigint
-
Reference type values: The values are stored in
heapfirst, then reference of the heap along with the variable name would be stored instack.ObjectsArraysFunctionsDatesTimesetc..