JavaScript Console

JavaScript

The JavaScript console give us some useful debugging tools to use with our program. The first is that most errors that prevent your program from running will appear here.


Additionally, you can use the console to display messages, using console.log(). For example:


You can access the JavaScript Console two ways. The first is to click the three dots menu in the top right corner of the screen. From this menu navigate to More Tools>Developer Tools. In the drawer that appears, select "Console".

You can also access Developer Tools by right clicking on the page and selecting "Inspect", the select "Console" in the resulting drawer.

JavaScript Console courses

Exercises: Logic

A collection of exercises using boolean logic

Exercises: While Loops

Helicopter Game

Create a game where the player pilots a helicopter with the mouse and collects coins while avoiding obstacles

JavaScript Console lessons

Logic && and ||

Use && for "and". Use || for "or"

While Loops: Counting Backwards

You've seen how to count forwards, how can you change it to count backwards

Helicopter Game: Movement and Coins

In the first part of this course we will be making a simplified version of the game which allows the player to move and to collect coins

Personality Quiz

Make a personality quiz on a website to find out what kind of animal you are!

Related Links

Console Reference Page

You can also have the console display alerts and colors, as well as more advanced features
About JavaScript Console

How to use Chrome's JavaScript console