Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Remove Duplicates in an Array

const removeDuplicates = (arr) => [...new Set(arr)]

removeDuplicates([31, 56, 12, 31, 45, 12, 31])
//[ 31, 56, 12, 45 ]
Source by livecodestream.dev #
 
PREVIOUS NEXT
Tagged: #Remove #Duplicates #Array
ADD COMMENT
Topic
Name
4+7 =