过滤数组中的(多个)指定值
JavaScript
const without = (arr, ...args) => arr.filter(v => !args.includes(v))
Examples
without([2, 1, 2, 3], 1, 2) // [3]
const without = (arr, ...args) => arr.filter(v => !args.includes(v))
without([2, 1, 2, 3], 1, 2) // [3]