I am trying to remove duplicates in an array with new Set gives an error "new Set(names).slice is not a function"
const names = ["Mike","Matt","Nancy","Adam","Jenny","Nancy","Carl"];
const uniq = [ ...new Set(names) ];
console.log(uniq);
Here is the code on stackblitz