Tell us what’s happening:
Hi, I am trying to figure out this JS exercise, (see the link that’s at the bottom of this threat)
I have done the exact same thing in VS Code and I do get all the expected results, but when I do it from here, the freeCodeCamp, all of the tests fail
Has any one else had this same problem? Any help will be greatly appreciated.
Thanks, I appreciate the tip.
The problem is that the solution I have posted there works, if you copy that code snippet and paste it into VS Code you will see that it works perfectly fine, the function returns the array of numbers that are expected in the exercise to get the tests passed.
Ah, you edited this now. arr is an array of all inputs instead of just the first argument… Big difference. The original code you posted just doesn’t work the way you claim, but the edit is a very different code.