Throughout the chapter, you created variables so you could refer to some data inside your functions. Early on, we told you that strings, numbers, and Booleans are three of the five primitive data types. The other two types are null and undefined.
Table 6.2 summarizes the properties of the five primitive types.
Table 6.2 Primitive data types in JavaScript
All other types in JavaScript are considered compound types
or complex types. These include arrays and objects, which
can have other types inside of them. For example, you wrote a function that
produced an array of thumbnail objects. Arrays also have properties (like length
)
and methods (such as forEach).
You will continue to work with primitive and complex data types throughout this book.
3.128.173.53