Stuck on freeCodeCamp vs browser console - solution doesn't match prompt

Stuck on freeCodeCamp vs browser console - solution doesn’t match prompt
I’m completely stuck on this seemingly simple challenge. I can print the output in both consoles and clear it from the browser console, but the tests aren’t logging that it’s cleared from the browser console. The given solution to the problem also doesn’t match the prompt anymore (the solution is given for the prompt to print the output once in the freeCodeCamp console and twice in the browser console, but the current prompt is to print the output once in the freeCodeCamp console and not at all in the browser console).

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(output);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36

Challenge: Understanding the Differences between the freeCodeCamp and Browser Console

Link to the challenge:

…and one minute after giving up and posting this, I figured it out. Ignore me!

I don’t think console.clear takes a parameter.

1 Like

Yup, that was my problem! Thanks.

…and one minute after giving up and posting this, I figured it out. Ignore me!

Yup, been there. This happens … all … the … time.

1 Like

do you mean the solution in “Get a Hint”? that’s maintained by volunteers, if you open a thread in #contributors to notify that it needs updating it would be great

Will do, thank you so much!

At least I’m in good company! :smile:

FYI, I updated the Hint page.

1 Like