You’re failing exactly one test. They’re checking the parameter name being accepted by your function, to make sure that parameter is named args. Your parameter is named z, which you then spread, and create a new array, which isn’t neccessary.
Instead, put args in the parameters of your function, just like you have z, remove the definition for args (where you set it up as a clone of z), and you should be good.
So I took your code, above, and commented it. There is no reason for ‘z’, and that is what is causing your code to fail. That. Just that. If you simply remove the line
const args = [...z];
and used return function(...args){, you’d have the same exact result, without an unneccesary variable, and you’d pass.
As a developer, and an all-around old-school techie, I find that I learn best by breaking things. When I’ve got them good and busted, figuring out WHY they’re busted, and how to fix them? That’s when I learn the most.
You busted this one good, and hopefully you learned a little something. The lesson here is, don’t create ‘throwaway’ variables. If you create a function parameter solely for the purpose of assigning it to a variable and never use it again… do you really need one or the other?
It was a very good question you asked, and it was an easy gotcha. Glad it worked out, and don’t get discouraged. You’re doing fine.