Primitive and non primitive values
- Primitive Data Types: These data types include numbers, strings, booleans,
null,undefined, and symbols. These types are called "primitive" because they represent single values and are not objects. Primitive values are immutable, which means once they are created, their value cannot be changed. - Non Primitive Data Types: In JavaScript, these are objects, which include regular objects, arrays, and functions. Unlike primitives, non-primitive types can hold multiple values as properties or elements.