调用concat()方法原数组不会发生改变, 如: <script type="text/javascript"> var mya = new Array(3); mya[0] = "1"; mya[1] = "2"; mya[2] = "3"; document.write(mya.concat(4,5)+"<br>"); document.write(mya); </script> 运行结果: 1,2,3,4,5 1,2,3
1 回答
举报
0/150
提交
取消
调用concat()方法原数组不会发生改变, 如: <script type="text/javascript"> var mya = new Array(3); mya[0] = "1"; mya[1] = "2"; mya[2] = "3"; document.write(mya.concat(4,5)+"<br>"); document.write(mya); </script> 运行结果: 1,2,3,4,5 1,2,3
2014-06-18
举报