Basics #4 Viewing Console in Developer Tools

1. Using console.log

The mostly used way to check variable values is to use console.log().

console.log("Hello World");

2. Opening Developer Tools in Chrome

From the menu select More Tools>Developer Tools.

Chrome

3. Opening Developer Tools in Firefox

From the menu select Tools>Web Developer>Toggle Tools.

Firefox

4. Errors are also logged here.

Whenever some of your scripts do not work as expected,go to console to check error message for debugging.

>> Next lesson >>