Debugging - Understanding the Differences between the freeCodeCamp and Browser Console

Tell us what’s happening:
Describe your issue in detail here.

I have followed the course exactly but in my browser I keep getting the same error message:
Uncaught SyntaxError: redeclaration of let output
debugger eval code:1
Clicking the code link sends me to: SyntaxError: redeclaration of formal parameter "x" - JavaScript | MDN
and is explaining that I’ve assigned output a second time. I’m stumped and have even tried excluding the let output = in the browser since it’s already in the FCC browser.

Your code so far
let output = “Get this to show once in the freeCodeCamp console and not at all in the browser console”;
console.log(output);
console.clear();

let output = "Get this to show once in the freeCodeCamp console and not at all in the browser console";

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/110.0

Challenge: Debugging - Understanding the Differences between the freeCodeCamp and Browser Console

Link to the challenge:

You would only get this error if you are trying to declare output twice. The default code already declares output. You aren’t declaring it again are you?

I have tried both. I have declared output in my browser via menu → more tools → Web Developer Tools and I have left it absent and just added the two console commands. I have also right clicked on the top of the freeCodeCamp page and done the same. I got the same error code each time.

Where are you entering your code? In the FCC editor or in the console in dev tools?

Eureka! I just did this in the FCC editor and it worked. Stupidly, simple. Thank you for the help bbsmooth!

What an incredibly misleading thing for FCC to do having us open our web browser and go through all the steps to enter it that way for it to simply be the same type of guard-rail coding we’ve been doing. Even the “answer” they produce has you going through the many steps of using webtools console tab to enter it there.

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