Chapter 9Arrays
What Is an Array?
The concept of an array is found in all programming languages. Arrays are actually variables, just a little more complicated than the standard variables you have encountered so far in this book. You can think about an array as a set of variables with the same name. We use arrays when we want to work with a certain set of related data all of the same data type. An example would be a set of students’ ages. These would all be integer values and they would be related. As a programmer, if you want to process an individual item of an array you need to specify the array name and indicate which array element is being referenced. Specific elements are indicated by an index or a subscript.
Some History
Way back in the dark ...
Get Advanced Javascript, 3rd Edition 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.