+ 3

concat

what if we want to concat more than one array.

10th Jul 2018, 2:22 PM
Riya Tarika
2 Answers
+ 5
Hello, Riya Tarika ! Method "concat()" Can merge one or more arrays into javascript For Example: a = new Array(1,2,3); b = "bird"; c = new Array(42, "fox"); d = a.concat(b, c); alert(d);
10th Jul 2018, 2:33 PM
Alexander Sokolov
Alexander Sokolov - avatar
+ 2
newArray = arr0.concat(arr1, arr2, arr3);
10th Jul 2018, 2:31 PM
CalviŐ˛
CalviŐ˛ - avatar