yup
BUT!! when using loops to remove elements from an array, its VERY important that you go backwards from the last element to the front. You can see I did that by setting an i to the length of the arrray then using i-- to cycle down to 0 (when i is 0 the while condition is false and it stops). The reason for this is that if you start from the front, when deleting an element, all elements after it would have to shift forward making up for that deleted spot. When this happens, the next element slides into the space of the element you just deleted, the element after that one slips in to the next elements spot (who just slipped into the current) etc. Now, this happens at the point of deletion. Its after the deletion that you go to the next elementā¦ however, the next element just became the current! So youād actually be skipping right over it! DOH! ā¦ there are alternative ways to handle this, but going backwards is the easiest