Tell us what’s happening:
The lessons keep referring to callback functions but it
is not clear what is a “callback”.
Please explain line by line in the code below what is
a callback function.
Your code so far
function destroyer(arr) {
var args = Array.from(arguments).slice(1);
return arr.filter(function(val) {
return !args.includes(val);
});
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:83.0) Gecko/20100101 Firefox/83.0
.
Challenge: Seek and Destroy
Link to the challenge: