Answers for "array reduce duplicates"

95

js delete duplicates from array

const names = ['John', 'Paul', 'George', 'Ringo', 'John'];

let unique = [...new Set(names)];
console.log(unique); // 'John', 'Paul', 'George', 'Ringo'
Posted by: Guest on March-11-2020
1

javascript remove duplicates

uniq = [...new Set(array)];
Posted by: Guest on December-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language