Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

lodash remove element from array

var colors = ["red","blue","green","green"];
var greens = _.remove(colors, function(c) {
    return (c === "green"); //remove if color is green
});
//colors is now ["red","blue"]
//greens is now ["green","green"]
 
PREVIOUS NEXT
Tagged: #lodash #remove #element #array
ADD COMMENT
Topic
Name
6+7 =