我们创建了三个数组,然后使用 concat() 把它们连接起来: <script type="text/javascript">
var arr = new Array(3) //等同写法 var arr = ['George','John','Thomas'] 其实 就是语法糖 arr[0] = "George" arr[1] = "John" arr[2] = "Thomas" var arr2 = new Array(3) arr2[0] = "James" arr2[1] = "Adrew" arr2[2] = "Martin" var arr3 = new Array(2) arr3[0] = "William" arr3[1] = "Franklin" document.write(arr.concat(arr2,arr3)) </script> 输出: George,John,Thomas,James,Adrew,Martin,William,Franklin