remove duplicates array js es 6 code example
Example 1: javascript filter array remove duplicates
// Using the Set constructor and the spread syntax:
arrayWithOnlyUniques = [...new Set(arrayWithDuplicates)]
Example 2: remove duplicate array es6
let a = [10,20,30,10,30];
let b = [... new Set(a)];
console.log(b);