The JavaScript Pocket Guide: Arrays
Arrays are a great tool for organizing and manipulating a lot of data. JavaScript arrays can store any of the JavaScript data types in any order. If you store your data in arrays, operating on it is simply a matter of looping over each value. It's a simple operation, but you'll find that arrays and loops have endless uses in JavaScript programming.
Creating Arrays
The best way to create a new array is with the array literal syntax ([]), but the array constructor function is available too. If you pass a single number value to the constructor function, you get an array filled with that many undefined values.
var myArray = [];
var myFilledArray = new Array(4);
myFilledArray;
[undefined, undefined, undefined, undefined]