Errors

Open your Chrome browser and type about:blank into the address bar. This will give you a new, blank page. Then press the F12 key.

Note: Function Keys

F12 is not the F key, the 1 key, and the 2 key. F12 is just one key. It's one of the "function keys" above the number keys on your keyboard.

Many laptops disable the function keys by default. You may need to hold down the Fn key in order to make F12 act like a function key.

The F12 key should open a new window on the side or bottom of Chrome. If it does something else (like changing the screen brightness, changing the speaker volume, or toggling your wireless on or off), then you will need to hold down the Fn key, press F12, and then release the Fn key.

In the new window, click on the Console tab. You should now be able to type at the caret (the > symbol).

Your first exercise is to mash the keyboard. Go ahead, go a little crazy! Punch in a bunch of letters and numbers and symbols.

You should see an error. Perhaps it was a ReferenceError, or a SyntaxError, or some other error. That's OK!

This first exercise is to illustrate one important point: no matter how much you mess up your program, you can't really do an permanent damage. You didn't break your computer or the Internet. In fact, Chrome just spit out an error and gave you another prompt (>). It's just fine, waiting for your next command. Modern computers have all kinds of safeguard built-in to them, and it is very difficult to do any real damage with the programs we'll be writing in this course!

So, don't be afraid of errors! You've already seen some, and they won't hurt you. In fact, errors happen all the time when programming! Even the best programmers in the world consistently make mistakes.

results matching ""

    No results matching ""