I read at many tutorials that the current best practices to create a new javascript array is to use
var arr = []
instead of
Also note that doing:
var x = [5];
Is different than doing:
var x = new Array(5);
The former creates an initializes an array with one element with value of 5. The later creates an initializes an array with 5 undefined elements.