0

I have array with values: [1,2,3,4,5,6,7,8,9]
How to remove values, for example with particular elements: [2,3,4,5]
In result, i need get: [1,6,7,8,9]
How to remove one element from array, i know

function remove(array, value) {
    for(var i=0; i<array.length; i++) {
        if(array[i] == value) {
            array.splice(i, 1);
            break;
        }
    }
}

But, I need to remove not one element from array. I need to remove multiple elements. Please, help.

Valeriu
  • 171
  • 1
  • 1
  • 11
  • I'm voting to close this question as off-topic because stackoverflow is not a code writing service. – melpomene Nov 08 '15 at 14:43
  • Is there some particular reason you need to modify the array *in place*? Just call `.filter` and return a new array. – Jared Smith Nov 08 '15 at 14:45

0 Answers0