So... what you are doing is replacing the original array numbers
with a new array with the filtered info in it. If you want to mutate the initial array, it will take much more code. The reason that it will take much more code is that you are talking about modifying the length of an array while you are looping over it, which is a bad practice.
To do it, you might loop through the array once and find all of the indexes that have a value higher than 10. Then once you have all of the indexes, you can loop over them and splice out those sections of the array.
The following code is how you could do it. Not sure about most efficient, but it is a way.
let numbers = [15, 5, 2, 1, 59, 29];
let badIndices = [];
numbers.forEach( (val, idx) => {
if(val > 10) badIndices.push(idx);
});
badIndices = badIndices.reverse();
badIndices.forEach( i => numbers.splice(i, 1));
You will want to reverse the order of the indices before splicing, otherwise the offset for the subsequent indices will be off. In other words, you will want to start splicing from the end to the front. Otherwise, removing from the front changes the subsequent indices, making the function invalid.