Debugging: Understanding the Differences between the freeCodeCamp and Browser Console - Needs additional info in order for it to work

Tell us what’s happening:
Note that per MDN
“Note that in Google Chrome, console.clear() has no effect if the user has selected “Preserve log upon navigation” in the settings.”

So this task will not work as intended unless the user turns of Preserve log upon navigation in the dev tool settings.

Your code so far


// Open your browser console
let outputTwo = "This will print to the browser console 2 times";
// Use console.log() to print the outputTwo variable
console.log(outputTwo);

let outputOne = "Try to get this to log only once to the browser console";
// Use console.clear() in the next line to print the outputOne only once
//console.clear();

// Use console.log() to print the outputOne variable
console.log(outputOne);

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/debugging/understanding-the-differences-between-the-freecodecamp-and-browser-console

1 Like

Bugs should be reported as GitHub Issues. Before creating an issue, please do a search to make sure that it hasn’t already been reported.

not working on Mozilla Firefox too

1 Like