To be more specific is there a simplier way of doing this:
var test0 = [[0,2,4], [1,3,5]];
var test1 = [[6,8], [7,9,11]];
test0.forEach(
function(item0, index) {
test1[index].forEach(
function(item1) {
item0.push(item1);
}
);
}
);
I have tried to use concat() at the first level of forEach() but it does not work for a reason that still escape me...
Edit: Thanks for the first answers. Bonus question, why this one does not work?
var test0 = [[0,2,4], [1,3,5]];
var test1 = [[6,8], [7,9,11]];
test0.forEach(
function(item, index) {
item.concat(test1[index]);
}
);
Thanks in advance

itembut you have to assign result totest0[index])