Using a Array.splice is fine as long as it's a single value.
Suppose I have an array with 10 elements and I want to remove element 2,4 and 8, using Array.splice(index,1) in a for loop is a bad idea because the index of each element changes after each splice operation.
How can I remove specific array items and then re-arrange the array accordingly
var array = ["Apple", "Banana", "Peach", "Pumpkin", "Tomato", "Mango", "Guava"];
remove(array, 4,5); //Is there a lodash function for this?
//desired result --> ["Apple", "Banana", "Peach", "Guava"]