Cannot see two log statement in freeCodeCamp editor?

Tell us what’s happening:

Your code so far

// Open your browser console.
let output = "Get this to log once in the browser console and twice in the freeCodeCamp console";
// Use console.clear() on the next line to clear the browser console.

// Use console.log() to print the output variable.

// Check the two consoles to see the difference. The freeCodeCamp console should have printed the variable twice, once for each test of this challenge. The browser console should only print the variable once because you cleared it first.

Your browser information:

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

Challenge: Understanding the Differences between the freeCodeCamp and Browser Console

Link to the challenge:

Can anyone tell me what is here i am doing wrong. Why i am not getting 2 log statements ?

hmmmm seems like i’m getting the same issue but the test is still passing. I’d assume that the FCC console should only print output once since the 1st test will clear the console.

Try removing the console.clear() and see what happens. Then add the console.clear() and see how it is different. That’s pretty much the point of the exercise.

1 Like