首页 > TAG信息列表 > handleArr

二维数组去重

方法一: 1 handleArr () { 2 let arr = [[1], [1], [1, 2], [3], [1], [2, 4, 6], [3]] 3 let obj = {} 4 arr.forEach(item => { 5 obj[item] = item 6 }) 7 console.log(Object.values(obj)) 8 } 方法二: 1 handleArr () { 2 let arr