Q:

Write a JavaScript program to filter out the element(s) of a given array, that have one of the specified values

0

Write a JavaScript program to filter out the element(s) of a given array, that have one of the specified values.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

const without = (arr, ...args) => arr.filter(v => !args.includes(v));

console.log(without([2, 1, 2, 3], 1, 2));
console.log(without([2, 1, 2, 3], 3));

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now