Javascript Chp. 4

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

contains all the procedures, methods adn events that have been called but have not yet finished processing. It gives the ability to view a list showing the contents of the call stack is useful when tracing logic errors in large programs with multiple functions.

Explain how access to the call stack is useful in debugging. ​

helps prevent hard to find errors that would occur in non-strict mode.

Explain how strict mode can be useful in debugging.​

stepping in executes an individual line of code and then pauses until you tell the debugger to continue. Stepping over allows you to skip function calls. Program still executes each function that you step over, but it appears in each debugger as if a single statement executes. Stepping out executes all reamin code in the current function.

Explain the three stepping options found in the debugging tools in modern browsers.​

Program pause when it reaches the statement that has a breakpoint and you can then trace the program from there.

How is setting breakpoints useful in debugging?​

strict

In ____________________ mode, some features are removed from the language, while other features require more stringent syntax.​

use a code editor specialized for web development. They have built in things tha took for error messages. You can also use the w3c validation service.

Name two tools you can use to analyze your HTML code for errors, and describe how to use them for this task.​

finally

After you evaluate code for exceptions, you can use a ____ statement to perform cleanup or necessary tasks.​

catch

After you throw an error, you use a ____ statement to handle the error.

logic

An infinite loop is an example of a(n) ____ error.​

True

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 For each error encountered, a browser's console displays a line number ​and a description of the error.

False

T/F Syntax refers to the order in which various parts of a program run, or execute.​

Dependency is when code in one part of you program depends on code in anther part of a program to run properly. Any program longer than a handful of lines has dependencies. They add another complexity to programming.

What is a dependency and what role do dependencies play in debugging?​

commenting out code helps you isolate problems. You can comment out all lines except ones that you know work.

Briefly explain how to use comments to locate bugs with JavaScript.

Allows programming to write friendly error codes. Gives greater contorl over what errors occur.

Describe two advantages of implementing custom error handling.​

logic

​A program's ____ is the order in which various parts of the program run, or execute.

syntax

​The rules of a programming language are known as its ____.

logic

A ____ error is a flaw in a program's design that prevents the program from running as you anticipate.

run-time

A ____ error occurs when the JavaScript interpreter encounters a problem while a program is executing.

syntax error

A ____ error occurs when the interpreter fails to recognize code.

True

A breakpoint is a designation added to a specific statement in a program that causes program execution to pause when it reaches that statement.

call stack

The ____ is the ordered list maintained by a JavaScript processor containing all the procedures that have been called but have not yet finished processing.

​displayed in dialog boxes

The console.log() debugging method ​results in messages ____.

logic errors

The debugging tools built into modern browsers are especially useful in tracking down​ ____.

break mode

The term ____________________ refers to the temporary suspension of program execution so that you can monitor values and trace program execution.

displayed in dialog boxes

The window.alert() debugging method ​results in messages ____.

A variable list help you see how different valyes in the executing function affect program execution. A watch list is a list of expressions whose values are displayed adn updated throughout execution of a program.

What is the difference between a variables list and a watch list in browser debugging tools?​

Syntax errors are errors in the actual syntax itself that prevents it form being run. Run-time error deals with code that can't execute even though it's syntax is correct.

What is the difference between syntax errors and run-time errors?

driver

When using the console.log() method to trace bugs, it can be helpful to use a ____ program.

"use strict"

Which of the following JavaScript statements requests that processors remove some features from the language and require more stringent syntax for other features?​

debugger

Which of the following JavaScript statements works like a breakpoint?​

logging

Writing values directly to the console is known as ____.​

try

You enclose code that may contain an exception in a ____ statement.

error

You implement custom error handling using the ____________________ event.​

False

You log values to the console using the window.alert() method.​

throw

You use a ____ statement within a try block to specify an error message.

exception handling

____ allows programs to handle errors as they occur in the execution of a program.

break mode

____ is the temporary suspension of program execution so you can monitor values and trace program execution.​

tracing

____________________ is the examination of individual statements in an executing program.

debugging

____________________ is the process of tracing and resolving errors in a program.​`


Ensembles d'études connexes

Chapter 8 Intermediate Financial 1

View Set

Pharmacology ATI study questions part 25

View Set

Social Psychology Task 5 - Attitude Change

View Set

payless situational job interview.

View Set