

Why never use new Array in Javascript - Parseco
https://coderwall.com/p/h4xm0w
I love Javascript, but sometimes it seems it doesn't love me back. Take for instance the Array constructor function...
======
bdfh42
I agree that var a = new Array(1,2,3,4,5); is an old construct and should be
replaced by var a = [1,2,3,4,5];

but the form

var a = new Array(10);

can be very effective when you need an array with n elements and you are not
in a position to .push() new ones in - you just need those elements to be
there.

No confusion here - just lots of helpful language features.

------
dragonbonheur
Those arrays are behaving exactly how arrays behave in any language. Can't see
the problem here.

