< ;title>Concat() method of array
<script> <br>/* <br>Concat() method of array: <br>1. This method will not change the current state of the array. array, only a copy of the concatenated array is returned. <br>2. Return a new array. The array is generated by adding all arrayX parameters to arrayObject. <br>If the argument to concat() operation is an array, then the elements in the array are added, not the array. <br>*/ <br><br>var arr1 = [123,"aaa"]; <br>var arr2 = [false,333]; <br>var arr3 = [true,"ddd"]; <br>//You can continue to connect arrays or other elements<br>document.write(arr1.concat(arr2,arr3,"vvv") "<br/>");//123,aaa,false,333,true ,ddd,vvv <br>//The original array has not changed<br>document.write(arr1);//123,aaa <br></script>