I found on this link how to create arrays with a chosen number of zeros. Most efficient way to create a zero filled JavaScript array?
But my question is, imagine i already have a array
var a = ['hihi','haha']
how can i add 12 zeros after my two first elements ? So that it becomes :
a = ['hihi','haha',0,0,0,0,0,0,0,0,0,0,0,0];
of course I could go for a
for(var i = 0; i < 12, i++){
a.push(0);
}
but is there a one line method ? something like
a.push(6*[0]);