Chapter 6 Flashcards

Errors and Debugging

1
Q

What are bugs?

A

Programming errors

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the three kinds of errors?

A

Syntax, Runtime, and Logical

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the Parsing Stage?

A

The stage when the code is being prepared

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Syntax?

A

The structure of the language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is a Syntax Error?

A

A violation of the formal rules for a given language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is a Runtime Error?

A

Errors that do not appear until you run the program. Example - misspelled or undeclared variable.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is a Logic Error?

A

When the program runs successfully but does not output correctly.
Example - data input is wrong

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a Token?

A

A fancy word that means symbol, variable, or other atomic element in the program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the classification that JavaScript uses to group errors based on their cause?

A

Error Type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the error when a variable has not been defined?

A

Reference Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which error type:
Occurs when trying to parse syntactically invalid code.

A

Syntax Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which error type:
Occurs when a non-existent variable is used/referenced

A

Reference Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Which error type:
Occurs when trying to use a value in an invalid way.

A

Type Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Which error type:
Occurs when passing an invalid value to a function.

A

Range Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Which error type:
Occurs when improperly using a global URI-handling function.

A

URI Error

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Which error type:
The type from which all other errors are built.

A

Error