HTML and CSS Reference
In-Depth Information
creating arr ays
Arrays can be created using the object constructor
var
arrayName
= new Array(values)
o
r using an
array literal
An
array
is a
co
ll
ection of values
organized under a single name.
v
ar
arrayName
= [values];
Values within a
n
array are
referenced using the format
array[
i
]
where
array
is the array name
and
i
is the index number of
the value within the array.