title: Remove multiple elements from array in Javascript/jQuery
body: <p>I have two arrays. The first array contains some values while the second array contains indices of the values which should be removed from the first array. For example:  </p>
  
  <pre><code>var valuesArr = new Array("v1","v2","v3","v4","v5");   
  var removeValFromIndex = new Array(0,2,4);
  </code></pre>
  
  <p>I want to remove the values present at indices <code>0,2,4</code> from <code>valuesArr</code>. I thought the native <code>splice</code> method might help so I came up with:</p>
  
  <pre><code>$.each(removeValFromIndex,function(index,value){
      valuesArr.splice(value,1);
  });
  </code></pre>
  
  <p>But it didn't work because after each <code>splice</code>, the indices of the values in <code>valuesArr</code> were different. I could solve this problem by using a temporary array and copying all values to the second array, but I was wondering if there are any native methods to which we can pass multiple indices at which to remove values from an array.</p>
  
  <p>I would prefer a jQuery solution. (Not sure if I can use <code>grep</code> here)     </p>