How to Open Google Chrome's JavaScript Console

See JavaScript: Tips and Tricks for similar articles.

You can use Google Chrome's Console to practice JavaScript.

  1. Click on the three-vertical-dot icon in the upper right of Google Chrome.
  2. Select More Tools.
  3. Select Developer Tools.Google Developer Toolbar
  4. The tools will usually be docked on the right or bottom of your screen. Make sure that the Console is selected:Google Developer Tools ConsoleYou may need to drop down the menu to see the Console option:Google Developer Tools Menu
  5. Now type "gobbledygook" in the Console and press Enter:gobbledygookThe word "gobbledygook" doesn't mean anything in JavaScript and we have not defined a variable named "gobbledygook", so we get an error.
  6. To clear the Console, press the Clear Console icon:Clear Chrome Console
  7. You should now have a clear Console to start practicing JavaScript:Chrome Console Cleared
  8. Test it by ype var age = 18; and press Enter:declaring ageDon't worry about the "undefined" response. All that means is that your code didn't return anything.
  9. Now type age; and press Enter:showing ageThis time it does return something - the value of age.
  10. You can also access the existing document. To demonstrate, type'red'; and press Enter. The background color should change to red.

Play around with the console. Have fun!

Related Articles

  1. Node.js and Node Package Manager (npm)
  2. How to Install Node.js on a Mac
  3. How to Run a Node.js Application on Windows
  4. How to Send and Receive JSON Data to and from the Server
  5. How to Run a Node.js Application on a Mac
  6. How to Open Google Chrome's JavaScript Console (this article)
  7. How to Create a Google Map Object with the Maps JavaScript API
  8. Why JavaScript is called JavaScript
  9. How to Learn JavaScript on Your Own
  10. How to Install Node.js on Windows