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

10 lines
204 B
JavaScript

const removeFromArray = function(array, ...args) {
const newArray = [];
return array.filter(val => !args.includes(val));
};
// Do not edit below this line
module.exports = removeFromArray;