An array in JavaScript is collection of elements under a single variable name like in other languages. In JavaScript you can define an array using the following syntax
var arr =new Array(5);
Here arr is name of array and 5 is number of elements in array.
You need array name and index to assign and access array elements. First element is at index 0 and last element is at number of elements minus one position .You have to specify the position of element in bracket to get or set value for that element.
This short example shows how to define and use an array