ttomasko
Programmer
- Aug 6, 2008
- 28
Hello,
I have an array:
var a = [1,1,2,2,3,4,4,5,6,6];
I need to delete all the duplicates, i.e., both pairs of each duplicate so that I am only left with the elements that are unique.
In the example above the result should be 3, 5.
I've tried pushing or splicing to no avail.
Any suggestions would be great.
Tom
I have an array:
var a = [1,1,2,2,3,4,4,5,6,6];
I need to delete all the duplicates, i.e., both pairs of each duplicate so that I am only left with the elements that are unique.
In the example above the result should be 3, 5.
I've tried pushing or splicing to no avail.
Any suggestions would be great.
Tom