Https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/debugging/use-the-javascript-console-to-check-the-value-of-a-variable

Tell us what’s happening:
What exactly is the this question asking and how do I answer it?

Your code so far


let a = 5;
let b = 1;
a++;
// Only change code below this line


let sumAB = a + b;
console.log(sumAB);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_6) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.1.2 Safari/605.1.15.

Challenge: Use the JavaScript Console to Check the Value of a Variable

Link to the challenge:

The point of the lesson is to teach you an important tool called ‘console.log’ It will make more sense if you know what the console is. Try this:

  1. Right click the web page.
  2. go to “Inspect”
  3. now click on where it says “Console”

You can do this on any web page.

Now, look up at your code. Where it says to check the value of a using console.log, that means type console.log(a). Console.log calls the function, putting a inside the parentheses tells it that the a is what you’re supposed to console.

Now look in the console and you should see the value of a printed there.