Tell us what’s happening:
I’m 100% lost here. I’ve got no idea what the challenge wants me to do as it says " Note: You have to use the arguments
object."
I do realize I have to use numbers 2 and 3 as arguments to be passed into the destroyer.
As far as I know arguments after the array cannot be hard coded into destroyer function as there could be one or more of arguments to be passed in.
How can I pass something into the destroyer function without it being an argument?
I also can’t remember neither find any exercises that even remotely resemble this one.
Your code so far
function destroyer(arr) {
console.log(arr)
return arr;
}
destroyer([1, 2, 3, 1, 2, 3], 2, 3);
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36
Challenge: Intermediate Algorithm Scripting - Seek and Destroy
Link to the challenge: