Primitive type Vs Reference type

Опубликовано: 08 Октябрь 2024
на канале: Ahmed Abdelfatah
116
8

In JavaScript variables store values and the compiler is able to identify from the values which is a primitive type and reference one. There are many differences between both types.

Primitive: undefined, null, number, string, the symbol has a fixed size and stored on stack also accessed by value
Reference: Like object and array has a dynamic type and stored on the heap and accessed by its reference in memory.
For more learning materials and interesting software topics https://tech-hour.com/