Freecodecamp firefox code doesnt work unless control v from hint section

I am getting strange errors, in Javascript algorythms and datastructures.
Basically NO solution is “good”, unless i copy and paste from the hint section.
I dont know whats wrong. All Firefox addons are disabled.
Here is one of the error messages:

Array [ SyntaxError ]
Array [ SyntaxError ]
​
0: SyntaxError: unknown: Unexpected token (4:4)

  2 |   // Only change code below this line
  3 |  return obj[checkProp];
> 4 |   } else {
    |     ^
  5 |     return "Not Found";
  6 |   }
  7 |   // Only change code above this line
​ReferenceError: checkprop is not defined

Does anyone know a fix for this problem? I’d really like one.

This probably means you have bugs in the solutions you are writing. Share your code here and we can help you find these bugs.

the code i used which gets rejected is litterally the code on the hints page. the only way i get the checks to work is to paste the hints solution in.

This doesnt happen with every problem. However this is problematic for progress.

Please enter your code in the challenge and test it and if it still isn’t working then click the “Get Help” button and then “Create a help post”. We really need to see the exact code you are using in order to troubleshoot this.

Update: Actually, I guess you don’t want to create a new post. Just copy/paste your exact code in here. But for future new issues, be sure to create a new post as outlined above.

FYI: To paste code into this forum, put three back ticks on a line by itself, then paste the code below that, then put three more back ticks on a line by itself after the code.

1 Like

Allright will do.

So my point was that in the message i posted you can see “else” is flagged as an error. Which to me seems exceedingly strange.

It means you have some syntax error near that point, which is why we need to see your full code.

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