Array.prototype.push.apply

Array.prototype.push.apply(a,b) || a.push.apply(a,b);
var a=[1,2,3],b=[4,5,6];
Array.prototype.push.apply(a,b) 
a===[1, 2, 3, 4, 5, 6]
b===[4, 5, 6]

http://blog.csdn.net/maoguiyou/article/details/51433551
posted @ 2017-05-14 00:14  haveProgress  阅读(216)  评论(0编辑  收藏  举报