typescript array remove duplicateds code example
Example 1: javascript to remove duplicates from an array
uniqueArray = a.filter(function(item, pos) {
return a.indexOf(item) == pos;
})
Example 2: remove duplicate array es6
let a = [10,20,30,10,30];
let b = [... new Set(a)];
console.log(b);