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
Several families are planning a shared car trip on scenic drives in New Hampshire's White Mountains. To minimize the possibility
Rus_ich [418]

Answer:

Following are the response to the given question:  

Explanation:

Build a spring, sink, vertices, and vertices for each car for a household. Every unit in the stream is a human. Attach the source from each vertical of a family with such a capacity line equivalent to the family size; this sets the number of members in each household. Attach every car vertices to the sink with the edge of the car's passenger belt; this assures the correct number of people for every vehicle. Connecting every vertex in your household to any vertex in your vehicle with a capacity 1 border guarantees that one family member joins a single car. The link between both the acceptable allocation of people to vehicles as well as the maximum flow inside the graph seems clear to notice.

5 0
2 years ago
Which is a disadvantage of pie charts?
anzhelika [568]
While the reader of a pie chart can clearly see which categories dominate, it can be difficult to see categories that occupy only a small percentage of the chart. This problem becomes worse if there are many small categories in the chart. Labeling the categories can also be difficult.
6 0
3 years ago
You replaced the LCD panel in a laptop computer and verified full system functionality, including wireless connectivity. The cus
Degger [83]

Answer:

There was a mistake in the question. The question included a possible answer. I agreed with the answer given and provide an explanation why I agreed with the answer given.

ANSWER: The laptop's wireless radio is toggled to the off position

Explanation:

Since the laptop technician has verified full system functionality before the customer picked up the item then the problem is likely a setting issue. For the technician to test the wireless connectivity and was satisfied, it means the wireless LAN card was installed and the antennas are working to verify there are no hardware issues. The correct device driver must have been installed as well. Since other users can connect to the WAP it means it is not an external problem. All that is left to check is if the wireless radio is ON or OFF. The customer must have mistakenly toggled the wireless radio OFF and he needs to turn it on in other to connect to the Wireless Access Point.

3 0
3 years ago
What a suitable variable name to store the number of years old a person is
navik [9.2K]

age is a suitable variable name. It's descriptive and concise. Make sure it's lowercase.

8 0
3 years ago
List two ways to insert a chart in powerpoint
Zanzabum

Answer:

1st way: On the Insert tab, in the Illustrations group, click Chart. In the Insert Chart dialog box, click a chart, and then click OK.

2nd way: Click INSERT > Chart. Click the chart type and then double-click the chart you want.

3 0
3 years ago
Other questions:
  • write a c++ program that reads from the user a positive integer (in a decimal representation), and prints its binary (base 2) re
    8·1 answer
  • To create a button that will allow a user to send the form data to the server you use a type of ____
    5·1 answer
  • Which is the best and quickest way for Jim to share his scuba experience with everyone?
    8·1 answer
  • Name one app that currently has a positive impact on society and explain why you think it has had a positive effect.
    10·1 answer
  • A microphone is a type of electronic.<br><br> True/Faulse
    14·1 answer
  • The user can set their own computer hostname and username. Which stage of the hardware lifecycle does this scenario belong to?
    6·1 answer
  • The Company should use BLANK cables to provide Fast connectivity without electrical interference
    6·1 answer
  • Which of the following accurately describe the
    9·2 answers
  • GIVING OUT BRAINLIEST AND I AM ALSO WARNING EVERYONE TO NOT ANSWER A BUNCH OF rubbish just to get the points!
    7·2 answers
  • 18. WHICH MENU WOULD MOST LIKELY ALLOW YOU TO ADJUST YOUR LINE SPACING? *
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!