Number, text, boolean, NULL, Infinity, and symbol are primitive data types. The object is non-primitive data types. Arrays and functions in JavaScript are also objects.
Because only classes can have methods, string is non-primitive. Primitive people cannot. And when processing a String, numerous functions are needed, such as substring, indexof, equals, and touppercase.
Non-primitive data can be divided into four categories: range: This is a data type for storing data in a sequential order. Because the size of the array is also determined by the programmer, it can store any form of data.
A primitive data structure is a data structure that stores only one type of data. Non-primitive data structures are data structures that can hold data of multiple types. Integer, character, and float are examples of primitive data structures.
Share a personalized message with your friends.