The Array object is used to store a set of values in a single variable name. Each value is an element of the array and has an associated index number.

You create an instance of the Array object with the "new" keyword. The following example creates two arrays, both of three elements:

var family_names=new Array(3) //This creates the array with empty elements

var family_names=new Array("Tove","Jani","Stale") //This creates the array with the elements initialized.

You can refer to a particular element in the array by using the name of the array and the index number. The index number starts at 0.

If you create an array with a single numeric parameter, you can assign data to each of the elements in the array like this:

family_names[0]="Tove"
family_names[1]="Jani"
family_names[2]="Stale"

And the data can be retrieved by using the index number of the particular array element you want, like this:

mother=family_names[0]
father=family_names[1]

(from w3schools.org)

Creating Arrays

Table of Contents