Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check which is dubicate in object of array

const arry = [1, 2, 1, 3, 4, 3, 5];

const toFindDuplicates = arry => arry.filter((item, index) => arr.indexOf(item) !== index)
const duplicateElementa = tofindDuplicates(arry);
console.log(duplicateElements);

// Output: [1, 3]
Source by flexiple.com #
 
PREVIOUS NEXT
Tagged: #check #dubicate #object #array
ADD COMMENT
Topic
Name
9+1 =