Chapter 6: Errors and Debugging
Learning Objectives
Upon completion of this chapter, you should be able to do the following:
- Describe how to debug programs using
console.log
- Explain the three common error types: syntax error, runtime error, logic error
- Give examples of each of the three common error types
- Explain some best practices to avoid errors and debugging
- Explain how
ReferenceError
andSyntaxError
may occur, with examples
Key Terminology
While reading this chapter, you will notice the following key terms listed by the page they first appear on. As you read, you should make note of the definitions of these terms.
What is Debugging?
- bugs
- debugging
- syntax errors
- runtime errors
- logic errors
Categories of Errors
- parsing stage
- execution stage
- syntax
- exceptions
Diagnosing Error Messages
- token
- syntax highlighting
Error Types
- error type
- built-in object