📌  相关文章
📜  lodash 从数组中删除多个项目 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:56.908000             🧑  作者: Mango

代码示例1
var colors = ["red","blue","green","yellow"];
var removedColors = _.remove(colors, function(c) {
    //remove if color is green or yellow
    return (c === "green" || c === "yellow"); 
});
//colors is now ["red","blue"]
//removedColors is now ["green","yellow"]