showing results for - "lodash remove multiple items from array"
Pedro
14 Apr 2020
1var colors = ["red","blue","green","yellow"];
2var removedColors = _.remove(colors, function(c) {
3    //remove if color is green or yellow
4    return (c === "green" || c === "yellow"); 
5});
6//colors is now ["red","blue"]
7//removedColors is now ["green","yellow"]