Creating a JavaScript Array

An array can be created in JavaScript by any of the following:
var aryTest = new Array();
This initializes an empty array
var aryTest = new Array(2);
This initializes an array with the number of elements indicated in the parenthesis. Each element is undefined, which is demonstrated by looping over the array as follows:
for(i=0;i<aryTest.length;i++)
alert(aryTest[i]);
var aryTest = new Array(1,2,3,4);
This initializes [...]