I am looking for a simple solution. I have an array like array("a","b","c","a","g");
Now when i try splice or custom remove function , it removes all "a" elements from array.
What i want is when i remove "a" from the array , then the array should finally have 1 "a" element only inside it and remove all other dulicates of "a".
Now consider another case , when my array is like array("a","a","b","c","a") , then after removing "a" , the array should like array("a","b","c").
Help needed,
Thanks in advance
array.indexOf("a")and thenarray.splice(index, 1);spliceremove all same elements from array for me. i have used samearray.splice(index, 1).1states "remove only 1".