Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove duplicates in js

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

let unique = [...new Set(names)];
console.log(unique);
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #remove #duplicates #js
ADD COMMENT
Topic
Name
7+8 =