I seem to have trouble to concat two javascript arrays. Here is the code:
console.log("\n\n");
a = [[1,2]];
b = [[1,2,3]];
console.table(a);
console.table(b);
a.concat(b);
console.table(a);
in which I create two arrays 'a' and 'b' (with elements being arrays as well, but who cares), with the goal of adding the single element of 'b' (the array [1,2,3] to the array 'a'. I expect 'b' to have two elements now (the array [1,2] and the array [1,2,3], but it does not look so. I get the output as follows:
I expected the last output of console.table to have two rows with the content
0 1 2
1 1 2 3
What am I doing wrong here?
