1数组中删除重复
let arr = [1,2,4,3,6,4] Array.from(new Set(arr)) // es6中 .from()[1,2,4,3,6] [...new Set(arr)] // 扩展运算符[1,2,4,3,6]
1数组中删除重复
let arr = [1,2,4,3,6,4] Array.from(new Set(arr)) // es6中 .from()[1,2,4,3,6] [...new Set(arr)] // 扩展运算符[1,2,4,3,6]
内容版权声明:除非注明,否则皆为本站原创文章。