數組快速去重

數組快速去重

const list = [1,2,2,3,3,3,4,5];
const new_list = [...new Set(list)];
console.log(new_list);  // [1,2,3,4,5]
相關文章
相關標籤/搜索