Intro to Lists and Arrays
Storing, accessing, and manipulating lists of data is an essential and fundamental facet of programming. The most basic storage type is called an array.
Arrays are ordered lists. Each item in the array is called a member, and each member's position is called its index.
Array Syntax
Arrays are denoted by square brackets []. When creating an array, write each element inside the square brackets, separated by a comma.See the code snippet below for an example.
var myArray = [1, 10, 100, 1000];
Arrays with no elements an be created using the following syntax:
var myEmptyArray = [];