Question: Write a Javascript program to add Friday sales for a store over a month. Define an array to hold up to 5 amounts (a month

Write a Javascript program to add Friday sales for a store over a month. Define an array to hold up to 5 amounts (a month can contain at most 5 Fridays). Use a function whose duty (high cohesion) is to receive the array and the number of numbers to be added (3, 4, or 5) and return the total. Allow sales for a particular Friday to be negative (there may be a lot of returns). The main program will ask the user to input the number of numbers to be added, and those numbers; and then print the total.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!