When I run the test in Codecademy for findKey() I pass everything. With no problems, but when I use the same code in Visual Studio Code I get this error
And if I would remove
let predReturnValue = predFunction(values);
if (values === predFunction)
I get no errors in Visual Studio Code, and it’s working as it’s supposed to.
but if I do the same in Codecademy I don’t pass the test.
How come this is happening?
What is right and what is wrong?
(More Pictures in the comments since I could only upload 1)