常见的合并数组方法

常见的合并数组方法:concat();
a=[1,2,3,4,5,6]
b=["foo","bar","bam","bun","fun"]
var c=a.concat(b);

输出结果:c=[1,2,3,4,5,6,"foo","bar","bam","bun","fun"]

posted @ 2017-07-18 10:45  小周同学  阅读(342)  评论(0编辑  收藏  举报