Chapter 6 Flashcards
Errors and Debugging
What are bugs?
Programming errors
What are the three kinds of errors?
Syntax, Runtime, and Logical
What is the Parsing Stage?
The stage when the code is being prepared
What is Syntax?
The structure of the language
What is a Syntax Error?
A violation of the formal rules for a given language.
What is a Runtime Error?
Errors that do not appear until you run the program. Example - misspelled or undeclared variable.
What is a Logic Error?
When the program runs successfully but does not output correctly.
Example - data input is wrong
What is a Token?
A fancy word that means symbol, variable, or other atomic element in the program.
What is the classification that JavaScript uses to group errors based on their cause?
Error Type
What is the error when a variable has not been defined?
Reference Error
Which error type:
Occurs when trying to parse syntactically invalid code.
Syntax Error
Which error type:
Occurs when a non-existent variable is used/referenced
Reference Error
Which error type:
Occurs when trying to use a value in an invalid way.
Type Error
Which error type:
Occurs when passing an invalid value to a function.
Range Error
Which error type:
Occurs when improperly using a global URI-handling function.
URI Error