I have two arrays:
var array1= [[1],[2],[3]];
var array2= [[10],[20],[30]];
is there a way to (have) a third array?
var array3 = [[1],[10],[2],[20],[3],[30]];
Maybe:
var test= array1.join(array2 + "<br>");
I have two arrays:
var array1= [[1],[2],[3]];
var array2= [[10],[20],[30]];
is there a way to (have) a third array?
var array3 = [[1],[10],[2],[20],[3],[30]];
Maybe:
var test= array1.join(array2 + "<br>");
I think you are looking for the "concat" function
Join two arrays:
var hege = ["Cecilie", "Lone"];
var stale = ["Emil", "Tobias", "Linus"];
var children = hege.concat(stale);
The values of the children array will be:
Cecilie,Lone,Emil,Tobias,Linus
Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/concat
You can either use CONCAT
function like
array1 = array1.concat(array2)
OR, APPLY()
array1.push.apply(array1, array2)