Exam 3: Building Arrays and Controlling Flow

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

What are loop statements used for in programming?

Free
(Essay)
4.9/5
(34)
Correct Answer:
Verified

Often in programming, you need to repeat the same statement, function, or code section  perhaps five times, 10 times, or 100 times. For example, you might want to perform the  same calculation until a specific number is found. In that case, you would need to use a  loop statement , a control flow statement that repeatedly executes a statement or a series  of statements while the value of a specific condition is truthy or until the value of a specific  condition becomes truthy.

A ____ statement restarts a loop with a new iteration.

Free
(Multiple Choice)
4.9/5
(41)
Correct Answer:
Verified

B

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

Free
(Multiple Choice)
4.8/5
(37)
Correct Answer:
Verified

A

Explain how index numbers are assigned to array elements and give an example.

(Essay)
4.8/5
(30)

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

(Multiple Choice)
4.8/5
(41)

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

(Multiple Choice)
4.8/5
(39)

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

(Short Answer)
4.8/5
(37)

Case labels must be discrete values and cannot use operators.

(True/False)
4.9/5
(36)

Define decision making and describe its role in programming.

(Essay)
4.8/5
(27)

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

(Multiple Choice)
5.0/5
(50)

Each repetition of a looping statement is called a(n)____.

(Multiple Choice)
4.8/5
(31)

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

(Short Answer)
4.8/5
(44)

An if statement keeps repeating until its conditional expression evaluates to false.

(True/False)
4.7/5
(33)

Which method  returns a collection of references to all instances of  a certain element in an HTML document?

(Multiple Choice)
4.8/5
(28)

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

(Multiple Choice)
4.8/5
(44)

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

(Multiple Choice)
4.8/5
(41)

Describe the four steps that occur when a JavaScript interpreter encounters a for statement.

(Essay)
4.8/5
(30)

What is the difference between an if statement and an if/else statement?

(Essay)
4.7/5
(34)

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

(Multiple Choice)
4.8/5
(39)

You can think of an array as a collection of variables contained within a single variable.

(True/False)
4.8/5
(29)
Showing 1 - 20 of 42
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)