So were exactly do you run this console.log() command?
In order to see the difference between the live console (terminal of freecodecamp) and our browser console we need to open up the console in our browser.
Contemporary internet browser have a built in feature called Developer Tools which, among others contains a live console.
Please follow the instructions provided and copy paste the JS code provided to the example from FCC to your browser’s console!
- Click the the following: Menu->More Tools->Developer Tools->Console tab
- or else , for keyboard shortcut: Ctrl + Shift + J (Windows/Linux)
- Click the the following: Menu->Developer->Web Console
- or else , for keyboard shortcut: Ctrl + Shift + K (Windows/Linux)
- Click the the following: Safari->Preferences->Advanced
and to the option presented enable: “Show Develop menu in menu bar”
Lastly, click: Develop->Show Error Console
- Click the the following: ‘’…’’ symbol->Developer Tools-> Console tab
Solution 1 (Click to Show/Hide)
// 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. console.clear(); // Use console.log() to print the output variable. console.log(output); // Check the two consoles to see the difference. The freeCodeCamp console should have printed the variable twice, one for each test of this challenge. The browser console should only print the variable once becuase you cleared it first.