I didn’t actually understood the arr here…what actually it does …this is working code…but I didn’t understood how it has used arr as a array and used the comparison operator
function destroyer(arr) {
var args = Array.prototype.slice.call(arguments);
for (var i = 0; i < arr.length; i++) {
for (var j = 0; j < args.length; j++) {
if (arr[i] === args[j]) {
delete arr[i];
}
}
}
return arr.filter(Boolean);
}```
Your browser information:
Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/604.4.7 (KHTML, like Gecko) Version/11.0.2 Safari/604.4.7
.
Link to the challenge:
https://www.freecodecamp.org/challenges/seek-and-destroy