Understanding the Differences between the freeCodeCamp and Browser Console - Chrome error

Tell us what’s happening:
I ran into an issue with this challenge. When typing “console.log(outputTwo)” into the browser console, it just throws this error:
VM167:1 Uncaught ReferenceError: outputTwo is not defined
at :1:13
How can I proceed in the debugging lessons if I can’t even get this basic thing going?
Thanks in advance.

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

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

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

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.99 Safari/537.36.

Link to the challenge:

You are supposed to put the console... expression in the editor not in the browser console.
The reason why the challenge asks you to open the browser console is for you to see the output when the test is ran.

1 Like

I passed the challenge . But I am not clear the browser concept. would you like to say step by step clearly please?
In challenge , it says the “outputTwo” variable will print two times in browser . But I got this . I am not clear here.
here the pic…

The only way to print the value two times is calling the console.log twice with the same value.

So, in this case, the first requirement of the challenge doesn’t make any sense.


yeah I am clear now with some experiment . I think to solve this challenge a video should be provided. Otherwise ,sometimes anyone can pass the challenge quickly but without understanding the main concept . :slight_smile: