- Click on the three-vertical-dot icon in the upper right of Google Chrome.
- Select More Tools.
- Select Developer Tools.
- The tools will usually be docked on the right or bottom of your screen. Make sure that the Console is selected:You may need to drop down the menu to see the Console option:
- To clear the Console, press the Clear Console icon:
- Test it by ype
var age = 18;and press Enter:Don't worry about the "undefined" response. All that means is that your code didn't return anything.
- Now type
age;and press Enter:This time it does return something - the value of
- You can also access the existing document. To demonstrate, type
document.body.style.backgroundColor='red';and press Enter. The background color should change to red.
Play around with the console. Have fun!