CHAPTER 2
Playing with the Console
and Finding What’s Broken
When programming within web browsers, it’s extremely useful to be able to
use the browser’s JavaScript console. Most modern browsers have a JavaScript
console, but here we’re using Google Chrome.
Programming Can Be Overwhelming
At times it can make you want to throw your computer against the
wall (don’t). While doing this stuff, keep these two facts in mind:
- There will be things that you don’t know—this is OK.
- Your programs are going to break—this is OK.
Just remember that everyone struggles with this, and you’ll be just
fine.
2.1 Getting Started
Know the ICE Code Editor
We’re still using the ICE Code Editor that we used in Chapter 1,
Project: Creating Simple Shapes, on page 1. If you haven’t already
gotten started with ICE, go back to that chapter and familiarize
yourself with the editor.
Start a New Project
Any work that you have already done in ICE should be automatically saved,
so we can jump right into starting a new project. Click on the menu button
and then choose New from the menu:
When you’re done with this chapter, you will
- Be able to open/close the JavaScript
console - Know how to look for errors in the
JavaScript console - Be able to fix projects when ICE locks up
Prepared exclusively for Michael Powell report erratum • discuss