Primitive and Compound Data
Data types are divided into two basic categories, primitive and compound. Boolean values, numbers, strings, and the null and undefined values all constitute primitive data types. As you have seen, different data types are handled differently.
Compound data types are made up of more than one component. Two primitive data types, such as 10 multiplied by 7, can make up compound data. Compound data can have components made up of other compound data, made up of other compound data, ad infinitum. Compound data can mix and match different data types as well.
In addition to a multiple of primitives, compound data are made up of arrays and objects. By definition, arrays and objects are made up of more than one object. Arrays ...
Get JavaScript Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.