When implementing a for loop in Javascript and using an increment. Would there ever be a time to decrement for one loop?

I was working through the exercises with the Odin Project and one of the tasks was to create a function that would remove specific elements from an array and return the new array without the specified elements. I created the following code which works, but seems very incorrect. Is there ever a time when something like this would be appropriate, or should I always look to do it a more elegant way.

`const removeFromArray = function(myArray, ...elements) {
    for (let i = 0; i < myArray.length; i++){
        if (elements.includes(myArray[i])){
            myArray.splice(i,1);
            i--; // Here is the part in question
        }
    }
    return myArray;
};`

Without the decrement:
myArray = [1,2,3,4]; elements = [1,2,3,4]; result = [2,4] expected = []

I know the result occurs due to the nature of the splice operation which removes the items at the specified indices and then shifts everything together so that there are no gaps.

I have since looked at the official solution provided and realize a more elegant way to do this is:

`const removeFromArray = function (myArray, ...elements) {
  const newArray = [];
  myArray.forEach((item) => {
    if (!elements.includes(item)) {
      newArray.push(item);
    }
  });
  return newArray;
};`
`