1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
miss Akunina [59]
3 years ago
11

​Case-Based Critical Thinking Questions​Case 9-1Melissa, a computer science engineering student, is learning the basics of progr

amming 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?
A. ​monthName.reverse(5, 3, "Mar", "Apr", "May");B. ​monthName.sort(2, 3, "Mar", "Apr", "May");C. ​monthName.join(5, 3, "Mar", "Apr", "May");D. ​monthName.splice(2, 3, "Mar", "Apr", "May");
Computers and Technology
1 answer:
Sunny_sXe [5.5K]3 years ago
4 0

Answer:

Option D:  monthName.splice(2, 3, "Mar", "Apr", "May");

Explanation:

splice is a JavaScript array method which can be used to insert or remove item(s).

It has general syntax:  splice( i, n , item1, item2, item3, .... , itemX)

  • i : index position of the array where the item should be inserted or removed
  • n: number of item(s) should be removed starting from index-i
  • item1,item2,....itemX :  item(s) to be inserted

If we have an original monthName array with elements:

["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]

monthName.splice(2, 3, "Mar", "Apr", "May")  will

  • remove 3 items from index position-2 ("March", "April" and "May")
  • and insert three new items, "Mar", "Apr" and "May".

New array:

["January", "February", "Mar", "Apr", "May", "June", "July", "August", "September", "October", "November", "December"]

You might be interested in
if an individual inserts a thumb drive containing classified information on a computer in the office that is not part of the cla
KATRIN_1 [288]

Answer: Spillage

Explanation:

7 0
3 years ago
If you want to change the name or file type of an existing word processing document, what command should you use?
mezya [45]
I think that the answer is "save as"
8 0
2 years ago
Read 2 more answers
You can access various sites on WWW by using hyperlinks or by?
wlad13 [49]
You can access various sites on WWW by using hyperlinks or by?

Answer is: A following directions on-screen
5 0
2 years ago
Read 2 more answers
A keyboard shortcut is a key or combination of keys that you press to access a feature or perform a command. ___________________
andrey2020 [161]
I believe that this is true.
Ctrl+F
Ctrl+C
Ctrl+V
These are all keyboard shortcuts.

8 0
3 years ago
1) What is Net beans
Bingel [31]

Answer:

it's a software

Explanation:

NetBeans IDE lets you quickly and easily develop Java desktop, mobile, and web applications, as well as HTML5 applications with HTML, JavaScript, and CSS. The IDE also provides a great set of tools for PHP and C/C++ developers.

5 0
3 years ago
Other questions:
  • Which sentences in the passage show the preventive measures to avoid data breach?
    9·1 answer
  • .Although SQL is a language, you don’t use it to write applications? (true, false)
    8·1 answer
  • For an external usb hard drive attached to a computer, which is more suitable: a writethrough cache or a block cache
    14·2 answers
  • What does media saturation mean?
    15·1 answer
  • A communications objective is:
    12·1 answer
  • Which famous individuals was born on october 31st?
    7·1 answer
  • Write down the bit pattern in the fraction of value 1/3 assuming a floating point format that uses Binary Coded Decimal (base 10
    10·1 answer
  • IT specialists must display technical expertise and collaborative proficiency in the workplace. Select the IT specialist who dem
    7·1 answer
  • Who here has a crush on jk from bts but feels more mature than him
    10·2 answers
  • Describe how you will lunch a web browser using the start menu​
    6·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!