odin-default-js-exercises/removeFromArray/removeFromArray.js

7 lines
152 B
JavaScript

var removeFromArray = function(...args) {
const array = args[0]
return array.filter(val => !args.includes(val))
}
module.exports = removeFromArray