Code in Comment Possibly Detected

Hi! I can’t get pass through this topic - my code seems to work for 3 tests out of 4 - but the last one doesn’t go away, and doesn’t make any sense… please help??
I’m attaching the screenshot below, and here are the errors -

// running tests
Destructured parameter should be used.
// tests completed

here is my code -
// Only change code below this line
const half = ({max, min}) => (max + min) / 2.0;
// Only change code above this line

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.

Thank you.

@JeremyLT - thank you for replying. I saw that this topic was about that particular challenge, and decided to join the existing one rather than create a new topic. I think it is a bug in the code of the portal, and wanted to see if any freeCodeCamp developers are monitoring the forum

I split this into a separate topic because the problem is different than the one discussed in the old topic.

It would still help if you post your code instead of a screenshot. Screenshots make it extremely difficult to reproduce your issue.

However, looking at your screenshot, I would guess that your solution is not passing because you left the original code commented out. You were supposed to change the line, not add a new line with a new solution. I suspect the tests are still seeing the old code and failing you.

Can you confirm this be deleting the commented out old solution and seeing if it passes?

And in fact - it was a bug. After I signed off from Chrome where I was having the problem, and logged in with Firefox - and did the challenge again the same way I did it for the 100 previous attempts - it went through successfully.
No more problems.
Happy coding!

Hi Jeremy, that was a good guess - I tried with- and without the commented old code, the result was the same.

However, when I signed out from the Chrome session where I was having the problem, and logged in with a new Firefox session - the problem went away. I don’t thin the browsers are to blame, I think if I cleared Chrome’s history and all in-memory junk, and started a fresh Chrome session the result would be equally successful. So, there is a little bug somewhere there that doesn’t handle “dirty” browser sessions somehow.

I’m not blocked anymore.

Thanks for the amazing learning resource!! I wish I found it earlier.

thanks again,

Yeah, that happens with JS sometimes. Either the browser cache gets into a bad state or we push an update in production but the update isn’t in your cached version of the challenge. Glad you figured it out.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.