Exam 10: Exploring Arrays, loops, and Conditional Statements

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 appends an array with new items.

(Multiple Choice)
5.0/5
(40)

The value of the length property can be reduced without removing items from an array.

(True/False)
4.8/5
(33)

Identify the syntax of the while loop.

(Multiple Choice)
4.8/5
(38)

Identify the syntax of the statement label.

(Multiple Choice)
4.8/5
(38)

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 insert abbreviations of spring months into the monthName array.Which of the following methods should she use?

(Multiple Choice)
4.7/5
(33)

Identify a true statement of array.some(callback [,thisArg])method.

(Multiple Choice)
4.9/5
(33)

Identify the letter of the choice that best matches the phrase or definition. -This method converts the contents of an array to a text sequence with the array values in a comma-separated list.

(Multiple Choice)
4.8/5
(32)

Gregor, a software developer, is developing a calendar application. He has to use several if conditional statements to ensure that the calendar displays the exact number of days present in each month of each year. He creates a dayCount array to keep track of the number of days in each month. -Gregor wants to ensure February contains 29 days only in the year 2020 as it is a leap year.Which of the following should Gregor use to set the value in the dayCount array?

(Multiple Choice)
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
(34)

What is the output of the following code? Var scores = [92,68,83,95,91,65,77]; Var highScores = scores.filter(gradeA); Function gradeA(value){ Return value > 90; }

(Multiple Choice)
4.8/5
(31)

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.8/5
(34)

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

(Multiple Choice)
4.9/5
(35)

Numeric data can be sorted by creating a(n)_____ function that contrasts the values of two adjacent array items.

(Multiple Choice)
4.8/5
(38)

Identify the letter of the choice that best matches the phrase or definition. -This method inserts new items at the start of an array.

(Multiple Choice)
4.8/5
(35)

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

(Multiple Choice)
4.9/5
(33)

A _________ is a set of commands executed repeatedly until a stopping condition is met.

(Short Answer)
4.9/5
(40)

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

(Multiple Choice)
4.8/5
(37)

A command block is indicated by its opening and closing square brackets [ ].

(True/False)
4.8/5
(40)

Identify the letter of the choice that best matches the phrase or definition. -This method rearranges array items in alphabetical order.

(Multiple Choice)
4.8/5
(39)

The _____ method performs an action similar to the forEach()method except that the function it calls returns a value that can be used to match the contents of an existing array into a new array.

(Multiple Choice)
4.9/5
(27)
Showing 21 - 40 of 90
close modal

Filters

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