Images

Creating JavaScript Arrays

image

         To view the accompanying video for this lesson, please visit mhprofessional.com/nixonjavascript/.

JavaScript is capable of managing data in a more powerful manner than simply via variables. One example of this is JavaScript arrays, which you can think of as collections of variables grouped together. For example, a good metaphor for an array might be a filing cabinet with each drawer representing a different variable, as shown in Figure 5-1.

FIGURE 5-1 A filing cabinet representing a 10-element array

As with ...

Get JavaScript: 20 Lessons to Successful Web Development 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.