Returning Unique Values from an Array
If i've got an array like the following as an example:
myArray = [1,4,5,1,5];
How would I remove all the duplicate values (all the 1's and 5's in this
example) and only return the unique elements (4 in this example).
Any help would be greatly appreciated.
No comments:
Post a Comment