//1. 循环数组,添加元素 var a = [1,2,3]; var b = [4,5,6]; for(var i in b){ a.push(b[i]); } console.log(a); //[1,2,3,4,5,6] //2. 数组连接 concat var a = [1,2,3]; var b = [4,5,6]; var c = a.concat(b); console.log(c); //[1,2,3,4,5,6] //3. 拼接 splice var a = [1,2,3,4,5]; a.splice(2,1,6,7); console.log(a); //[ 1,2,6,7,4,5] //3.1 var a = [1,2,3]; var b = [4,5,6]; a.splice(a.length,0,...b); console.log(a); //4. 直接使用ES6展开运算符 var a = [1,2,3]; var b = [4,5,6]; a = [...a ,...b]; console.log( a); //[1,2,3,4,5,6]