This question already has an answer here:
If I have array, for example :
a=["a","b","c"]. I need something like
How can I do this?
Settle Down. I'm coming up with a duplicate for you since you clearly didn't search for yourself.
You know there is .splice right?
Yes, I know. But I'm considering that the array can have more than one "a"
I didn't think of that. Good point. +1
The array has only unique values !
this is valid for Array and arraylist both