Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove duplicates from array

let chars = ['A', 'B', 'A', 'C', 'B'];
let uniqueChars = [...new Set(chars)];

console.log(uniqueChars);

output:
[ 'A', 'B', 'C' ]
Source by www.javascripttutorial.net #
 
PREVIOUS NEXT
Tagged: #remove #duplicates #array
ADD COMMENT
Topic
Name
6+1 =