javascript remove duplicates in table code example
Example 1: javascript filter array remove duplicates
// Using the Set constructor and the spread syntax:
arrayWithOnlyUniques = [...new Set(arrayWithDuplicates)]
Example 2: javascript remove duplicates from array
var myArr = [1, 2, 2, 2, 3];
var mySet = new Set(myArr);
myArr = [...mySet];
console.log(myArr);
// 1, 2, 3