13

Arrays

In this Chapter

  • Use arrays to handle lists of data

  • Learn how to perform common tasks using the various array properties

Let’s imagine you are jotting down a list on a piece of paper. Let’s call the piece of paper groceries. Now, on the paper, you write a numbered list starting with zero with all the items that belong there, as shown in Figure 13.1.

images

FIGURE 13.1

A list of items that resembles a grocery list

By simply creating a list of things, what you have right now is a real-world example of an array! The piece of paper, called groceries, would be your array. The items that you need to purchase are known as the array values. ...

Get Javascript Absolute Beginner's Guide, 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.