duplicate numbers in an array javascript

Solutions on MaxInterview for duplicate numbers in an array javascript by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
showing results for - "duplicate numbers in an array javascript"
Elias
20 May 2016
1[1, 1, 2, 2, 3].filter((element, index, array) => array.indexOf(element) !== index) // [1, 2]