Primitive or Primary Data Types
There are 6 data types that are considered primitive values. They are
symbols. Because all of these data types are not objects and don’t have their own methods, they are considered primitive and are the simplest level of the language implementation. Besides that, primitives cannot be changed, so they are immutable. When assigning primitive values to variables, that will not make the variable necessarily primitive because the value of the variable itself has the ability to change, so it is mutable.
Composite or Reference Data Types
Special Data Types
Null values are considered special data types and can also be referred to as special primitive types because of their similarity to primitives. The difference between a null value and a primitive value is that null represents the intentional absence of data or the lack of relation to an object. A null value can be returned when an object is expected but no existing object is relevant.
It is important to understand data types when working with any programming language because data can be stored improperly and cause bugs in your applications.