Chapter 3 Flashcards

1
Q

T/F You can think of an array as a collection of variables contained within a single variable

A

True

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

T/F You access an array element’s value just as you access the value of any other variable, except that you must include the element index in brackets

A

True

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

T/F An if statement keeps repeating until its conditional expression evaluates to false

A

True

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

T/F Case labels must be discrete values and cannot use operators

A

True

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

T/F A break statement restarts a loop with a new iteration

A

False

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

You use a(n) BLANK when you want to store a group or a list of related information in a single, easily managed location

A

array

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

Each piece of data contained in an array is called a(n) BLANK

A

element

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

The BLANK statement is used to execute specific programming code if the evaluation of a conditional expression returns a truthy value

A

if

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

A set of statements contained within a set of braces is known as a(n) BLANK block

A

command

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

If you want to execute one set of statements when a condition evaluates to a truthy value and another set of statements when the condition evaluates to a falsy value, you need the BLANK statement

A

if/else

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

The BLANK statement controls program flow by executing a specific set of statements, depending on the value of an expression

A

switch

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

A(n) BLANK label in a switch statement represents a specific value and is followed by one or more statements that are executed if the value of the label matches the value of the switch statement’s expression

A

case

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

A case label consists of the keyword case, followed by a literal value or variable name, followed by a(n) BLANK

A

colon

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

The BLANK label contains statements that execute when the value returned by the switch statement does not match a case label

A

default

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

A(n) BLANK statement is used to end the execution of a switch statement

A

break

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

The conditional expression in the while statement is enclosed within BLANK following the keyword while

A

parentheses

17
Q

A BLANK statement is a control flow statement that repeatedly executes a statement or series of statements while the value of a specific condition is truthy or until the value of a specific condition becomes truthy

A

loop

18
Q

One of the simplest types of loops statements is the BLANK statement, which repeats a statement or series of statements as long as a given conditional expression evaluates to a truthy value

A

while

19
Q

Each repetition of a looping statement is called a(n) BLANK

A

iteration

20
Q

Unlike the while statement, the statements in a(n) BLANK statement always executes once, before a conditional expression is evaluated

A

do/while

21
Q

The BLANK statement is used to repeat a statement or series of statements as long as a given conditional expression evaluates to a truthy value

A

for

22
Q

A(n) BLANK statement restarts a loop with a new iteration

A

continue

23
Q

A single statement that declares a variable and specifies array values as its content is called a(n) BLANK

A

array literal

24
Q

Changing the order in which JavaScript code is executed is known as

A

controlling flow

25
Q

To end a switch statement once it performs its required task, include a(n) BLANK statement at the end of the statements associated with each case label

A

break

26
Q

In a(n) BLANK loop, a loop statement never ends because its conditional expression is never falsy

A

infinite

27
Q

Each repetition of a looping statement is called a(n) BLANK

A

iteration

28
Q

Placing one decision-making statement within another decision-making statement creates a(n) BLANK decision-making structure

A

nested