JavaScript骚操作

两个数组的合并

  var arr=[1,2,3,4,4];

  var arr2=['hello','world'];

       [].prototype.push.apply(arr,arr2);===>console.log(arr)[1,2,3,4,4,'hello','world']

posted @ 2018-01-25 10:46  阿法狗的世界  阅读(110)  评论(0)    收藏  举报