I have an array like this
Array[ one , two , three , four , five ]
and I have an array like this
Array[ 2 , 4 , 0 ]
indicating the indexes of the elements in the first array I wish to remove or .splice()
so the resulting array would look like this
Array[ two , four ] // <--- note no undefined positions
If you try and loop through the indexes and just do a splice for each one, after the first splice your indexes change according to the element that was removed.
How can I accomplish this?