- Syntax bugs happen when you type something the browser doesn’t understand, like
- Use Firefox’s error console to track down syntax errors.
- Logic errors are when you tell the browser to do the wrong thing.
alert()statements to track program execution. If
alertmessages are supposed to show up, but don’t, you know what code is not executing.
alert()statements to look at the values of variables.