What is the most efficient way to create an arbitrary length zero filled array in JavaScript?
Using lodash or underscore
_.range(0, length - 1, 0);
Or if you have an array existing and you want an array of the same length
array.map(_.constant(0));