For example, I have an array like this:
var arr = [1, 2, 2, 3, 4, 5, 5, 5, 6, 7, 7, 8, 9, 10, 10]
My goal is to drop the duplicate elements from the array and get the final array as follows:
var arr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
How can this be done in JavaScript?
NOTE: the array is not sorted; values can be arbitrary.
javascript arrays
Mehmet Ince May 25 '13 at 8:28 2013-05-25 08:28
source share