14. 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 this sheet of paper, you write a numbered list starting with zero with all the items that belong there such as what you see in Figure 14.1.

Image

FIGURE 14.1 An example of 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 array values ...

Get JavaScript Absolute Beginner’s Guide 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.