Chapter 9. Array()
Conceptual Overview of Using Array() Objects
Below, I store four strings in
myArray that I can access using a numeric index.
I compare and contrast it to an object-literal mimicking an associative
Arrays can hold any type of values, and these values can be updated or deleted at any time.
If you need a “hash” (a.k.a. associative array), an object is the closest solution.
Array()is just a special type of
Object(). That is,
Array()instances are basically
Object()instances with a couple of extra functions (e.g.,