Chapter 3, explained that objects and arrays are two fundamental datatypes in JavaScript. They are also two of the most important. Objects and arrays differ from primitive datatypes such as strings and numbers: instead of representing a single value, they are instead collections of values. An object is a collection of named values, and an array is a specialized kind of object that behaves as an ordered collection of numbered values. This chapter describes JavaScript objects and arrays in detail. |