Chapter 4 Flashcards
T/F Each time a program calls a procedure, the procedure is added to the top of the call stack, and then removed after it finishes executing
True
T/F Syntax refers to the order in which various parts of a program run, or execute
False
T/F For each error encountered, a browser’s console displays a line number and a description of the error
True
T/F You log values to the console using the window.alert() method
False
T/F A breakpoint is a designation added to a specific statement in a program that causes program execution to pause when it reaches that statement
True
A(n) BLANK error occurs when the interpreter fails to recognize code
syntax
A(n) BLANK error occurs when the JavaScript interpreter encounters a problem while a program is executing
run-time
A(n) BLANK error is a flaw in a program’s design that prevents the program from running as you anticipate
logic
When using console.log() method to trace bugs, it can be helpful to use a(n) BLANK
driver program
The BLANK is the ordered list maintained by a JavaScript processor containing all the procedures that have been called but have not yet finished processing
call stack
BLANK allows programs to handle errors as they occur in the execution of a program
Exception handling
You enclose code that may contain an exception in a(n) BLANK statement
try
You use a(n) BLANK statement within a try block to specify an error message
throw
After you throw an error, you use a(n) BLANK to handle the error
catch() statement
The rules of a programming language are known as its BLANK
syntax
A program’s BLANK is the order in which various parts of the program run or execute
logic
The console.log() debugging method results in messages being BLANK
displayed in the browser console
The window.alert() debugging method results in messages being BLANK
displayed in dialog boxes
The debugging tools built into modern browsers are especially useful in tracking down BLANK
syntax errors
BLANK is the temporary suspension of program execution so you can monitor values and trace program execution
break mode
After you evaluate code for exceptions, you can use a(n) BLANK to perform cleanup or necessary tasks
finally statement
The BLANK JavaScript statement works like a breakpoint
debugger
The BLANK JavaScript statement requests that processors remove some features from the language and require more stringent syntax for other features
“use strict”;
An infinite loop is an example of a(n) BLANK error
logic