Understanding the Differences between the freeCodeCamp and Browser Console(i tried but not working)

Tell us what’s happening:
How to satisfy this statement:
Use console.clear() to modify your output so that outputOne variable only outputs once.

Your code so far

let outputTwo = "This will print to the browser console 2 times";

let outputOne = "Try to get this to log only once to the browser console";
console.clear(outputOne);   // i already used here but not working


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

console.clear() doesn’t take any argument

(I don’t know if it is the only issue)


i was really confused in that whether it takes an argument or not you are right
console.clear() doesn’t take any argument
Thank you for clarifying my doubts

Hi ieahleen, so how does console.clear() affect the code ?

the command console.clear() remove everything that is present in the console.

1 Like