Whereas numbers and characters are scalar variables—meaning they contain only a single value at a time—arrays are a more complex structure. An array allows you to store a series of values, all under the heading of one variable. It's perhaps easiest to think of arrays as a two-column table (Table 6.1).
|A Simple Array|
Arrays consist of key-value pairs, each pair constituting an element. By referencing a specific key (also called its index), you can obtain that corresponding value.
You create an array much like any other variable: by giving it a type and a name. The type will apply to every element in ...