Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to remove duplicates in array in javascript

const numbers = [1 , 21, 21, 34 ,12 ,34 ,12];
const removeRepeatNumbers = array => [... new Set(array)]
removeRepeatNumbers(numbers) // [ 1, 21, 34, 12 ]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #duplicates #array #javascript
ADD COMMENT
Topic
Name
6+7 =