📌  相关文章
📜  javascript 从数组中删除重复项 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:01:58.445000             🧑  作者: 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 ]