var myArray=new Array();
myArray[0]="firsr";
myArray[1]="second";
var newArray = myArray.concat("third");
//newArray is now [first,second,third]
alert(myArray)
alert(newArray)
var firstArray =[12,32];
var secondArray = [24,52,13,54];
var newArray= firstArray.concat(secondArray);
alert(newArray);
转载于:https://www.cnblogs.com/liujinyu/p/3478885.html