Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

remove index from array javascript

remove multiple index from array

var valuesArr = ["v1", "v2", "v3", "v4", "v5"];   
var removeValFromIndex = [0, 2, 4]; // ascending

removeValFromIndex.reverse().forEach(function(index) {
  valuesArr.splice(index, 1);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #remove #index #array #javascript
ADD COMMENT
Topic
Name
3+6 =