If you have a question about a specific challenge as it relates to your written code for that challenge, just click the Ask for Help button located on the challenge. It will create a new topic with all code you have written and include a link to the challenge also. You will still be able to ask any questions in the post before submitting it to the forum.
It is a variadic function. Meaning you get a different amount of arguments passed to the function so you can’t hardcode the parameter list (Well, technically I’m guessing you might be able to pass the challenge using a hardcoded parameter list, but that is beside the point)
The point is your function should not expect a fixed amount of arguments. All you can be certain of is the first argument is always an array.
Hey!
As @lasjorg was explaining you want to use rest parameters here.
For example,
const destroyer = (array, ...args) {
}
args will be an array that contains additional parameters.
So for a function call destroyer([1, 2, 3, 1, 2, 3], 2, 3), your function will get 2 parameters: array = [1, 2, 3, 1, 2, 3] args = [2, 3]
The expected output is an array that does not contain any of the items from args array.
You want to remove the args items from input array