Possible duplicate:
What is the difference between "Array ()" and "[]" when declaring a JavaScript array?
In JavaScript, you can create a new array, for example:
var arr = new Array();
or how:
var arr2 = [];
What is the difference and why are you doing one on top of the other?
javascript arrays literals
cmcculloh
source share