There are lots of things to say about primitive and reference but I don’t want to confuse you. Primitive Data Types are data that are stored directly on the stack. This means when you access primitive data, you access it by its values. Reference data are accessed by reference and stored on the heap of the memory.
- String (Letters, numbers, symbols and a few others.)
- Number(Integals, decimals, float are all numbers)
- Symbols (Introduced in ES6)
- Object Literals
So, we will start by creating some variables with different types.
PRIMITIVE DATA TYPES
REFERENCE DATE TYPES
All reference types are object.
I will stop here now. I will talk about functions at a better applicable section and we will loot at Type conversion on Saturday.