What is the most efficient way to create an arbitrary length zero filled array in JavaScript?
By default Uint8Array, Uint16Array and Uint32Array classes keep zeros as its values, so you don't need any complex filling techniques, just do:
Uint8Array
Uint16Array
Uint32Array
var ary = new Uint8Array(10);
all elements of array ary will be zeros by default.
ary