?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?

A. ?springMonths = monthName.slice(2, 5);
B. ?springMonths = monthName.splice(2, 3);
C. ?springMonths = monthName.slice(3, 5);
D. ?springMonths = monthName.splice(5, 3);

Answer: B

Computer Science & Information Technology

You might also like to view...

A member function of a class should be made private

a. always b. only if it will never be used c. if it will only be used by other members of the class d. never, it is illegal to make a member function private.

Computer Science & Information Technology

Explain some of the authentication issues involved in using your credit card to order merchandise over the Internet.

What will be an ideal response?

Computer Science & Information Technology