文件名称:JS实现合并两个数组并去除重复项只留一个的方法
文件大小:26KB
文件格式:PDF
更新时间:2023-12-14 22:12:30
js 数组 方法
本文实例讲述了JS实现合并两个数组并去除重复项只留一个的方法。分享给大家供大家参考,具体如下: //It's merge arr1 and arr2 , delete the same element only leave one //It's only apdapter array. If object, no. //The sequence of the two array is not required. mergeArray:function (arr1, arr2){ for (var i = 0 ; i < arr1.length ; i ++ ){ for(var j