Exam 10: Exploring Arrays Loops and Conditional Statements Tutorial

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags
Identify the letter of the choice that best matches the phrase or definition.
This method duplicates items within an array.
join(separator)
This method converts the contents of an array to a text sequence with the array values in a comma-separated list.
concat(array1, array2,...)
This method rearranges array items in alphabetical order.
reverse()
Correct Answer:
Verified
Premises:
Responses:
This method duplicates items within an array.
join(separator)
This method converts the contents of an array to a text sequence with the array values in a comma-separated list.
concat(array1, array2,...)
This method rearranges array items in alphabetical order.
reverse()
This method rearranges array items in alphabetical order.
pop()
This method joins the array to two or more arrays, creating a single array containing the items from all the arrays.
push(values
This method duplicates items within an array.
copyWithin(target, start[, end])
This method inverts the order of items in an array.
sort()
This method removes the first item from an array.
array.toString()
This method converts the contents of an array to a text sequence with the array values in a comma-separated list.
array.unshift(values)
This method inserts new items at the start of an array.
shift()
Free
(Matching)
4.7/5
(46)
Correct Answer:
Verified

In an array literal, the array values are a space-separated list within a set of curly brackets.

Free
(True/False)
4.7/5
(31)
Correct Answer:
Verified

False

Increasing the value of the length property adds more items to an array, but the items have null values until they are defined.

Free
(True/False)
4.7/5
(35)
Correct Answer:
Verified

True

The while statement is used to exit a program loop before the stopping condition is met.

(True/False)
4.9/5
(35)

A _____, which employs the first-in-first-out (FIFO) principle in which the first item added to the data list is the first removed, is similar to a stack.

(Multiple Choice)
4.8/5
(38)

In an if loop, a variable known as a counter variable is used to track the number of times a block of commands is run.

(True/False)
5.0/5
(41)

Which of the following methods creates a new array populated with the elements of array that return a value of true from the callback function?

(Multiple Choice)
4.8/5
(42)

The _____ statement stops processing the commands in the current iteration of the loop and proceeds to the next iteration instead of stopping the program loop altogether.

(Multiple Choice)
4.9/5
(29)

The do/while loop is generally used when the program loop should run at least once before testing for the stopping condition.

(True/False)
4.8/5
(34)

A(n) _____ is a collection of values organized under a single name.

(Multiple Choice)
4.9/5
(23)

Identify a compare function that sorts numeric values in descending order.

(Multiple Choice)
4.8/5
(38)

What is the output of the following code? for (var i = 0; i

(Multiple Choice)
4.8/5
(32)

Which of the following methods is used to determine the day of the week on which a month starts?

(Multiple Choice)
4.9/5
(34)

What is the output of the following code? for(var i = 5; i > 0; i--)

(Multiple Choice)
4.9/5
(40)

Identify the general structure for accessing each value from an array using a for loop.

(Multiple Choice)
4.8/5
(36)

JavaScript supports logical operators that connect several expressions.

(True/False)
4.9/5
(33)

Identify the general structure of a for loop.

(Multiple Choice)
4.7/5
(37)

Case-Based Critical Thinking Questions Case 9-1 Melissa, a computer science engineering student, is learning the basics of programming by exploring arrays. She learns about different array methods. She wishes to learn more on inserting and deleting array items. She creates monthName array to extract only the three spring months-March, April, and May-from a calendar. Melissa wants to remove spring months from the monthName array. Which of the following methods should Melissa use?

(Multiple Choice)
4.9/5
(31)

Identify the structure of an if statement

(Multiple Choice)
4.8/5
(32)

Which of the following statements is used to terminate any program loop or conditional statement?

(Multiple Choice)
4.8/5
(45)
Showing 1 - 20 of 73
close modal

Filters

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