📌  相关文章
📜  删除重复的数组 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:20.802000             🧑  作者: Mango

代码示例1
const removeDuplicates = (arr) => [...new Set(arr)];

console.log(removeDuplicates([1, 2, 3, 3, 4, 4, 5, 5, 6]));
// Result: [ 1, 2, 3, 4, 5, 6 ]