remove duplicates js filter code example
Example 1: javascript remove duplicates from array
unique = [...new Set(arr)]; // where arr contains duplicate elements
Example 2: array remove duplicates javascript
uniq = [...new Set(array)];
unique = [...new Set(arr)]; // where arr contains duplicate elements
uniq = [...new Set(array)];