Chapter 4
Understanding Arrays
In This Chapter
Identifying and defining arrays
Building arrays
Moving beyond 2D with multidimensional arrays
Working within array elements
Using array functions and properties
“I am large. I contain multitudes.”
— Walt Whitman
Arrays are a fundamental part of any programming language. In this chapter, you discover what they are, how to use them, and what makes JavaScript arrays distinct from arrays in other programming languages. You work with arrays to create lists, order lists, and add and remove items from lists.
Making a List
The earlier chapters in this book involve working with variables that are standalone pieces of data, such as: var myName = “Chris”
, var firstNumber = “3”
, and var how ManyTacos = 8
. There are often times in programming (and ...
Get Coding with JavaScript For Dummies 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.