Primitive Vs Reference Data Types
Primitive Data : Primitive data types are commonly used data types which includes 7 datatypes in ES6 JavaScript, i.e String, Number, Boolean, Undefined, Null, BigInt and Symbols. Primitive values are stored in Stack for faster access as they are passed by value.
Reference Data Types : Reference data types are advance data types like Functions, Arrays, Objects, Map and Sets. They are stored on heap. Reference data types are passed by reference, not value. This means two variables with same reference object has same reference in memory.
JavaScript Data Types Post: JavaScript Data Types