Making Asteroid Dodger with JavaScript and HTML5 Canvaswith Ted Zhu
Debugging Tips

Debugging Tips

  • All JavaScript code is case-sensitive. Make sure that every letter of your code matches the casing as seen in the instructions.
  • Keep an eye out for all symbols such as parenthesis, periods, commas, quotations, and semicolons.
  • The semicolon at the end of every JavaScript statement is the easiest symbol to forget.

Note about whitespace:

For the most part, JavaScript doesn't care about whitespace (spaces, tabs, and carriage returns). In fact, it's actually encouraged for you to use as many spaces, tabs, and carriage returns as necessary to make your code easy to read. For example:

Without Whitespace
With Whitespace

Which is easier to read?

×