showing results for - "javascript remove duplicated from array"
Evita
27 Jun 2020
1const removeDuplicates = (arr) => [...new Set(arr)];
2
3console.log(removeDuplicates([1, 2, 3, 3, 4, 4, 5, 5, 6]));
4// Result: [ 1, 2, 3, 4, 5, 6 ]
5