0
How do i write a javascript program that asks the user to enter up to 10 golf scores, which are to be stored in an array?
You should provide a means for the user to terminate input prior to entering 10 scores. The program should display all the scores on one line and report the average score. Handle input, display, and the average calculation with three separate array processing functions.
4 odpowiedzi
+ 1
The instructions are so clear, I guess this is a homework? : )
+ 1
yeah😅
+ 1
Then I'm gonna give you some hints to get started with, you need to give it a try first, then come back when you have a code in progress, I doubt people here will do it for you, but they will help you to get your work complete, seeing you had given an effort : )
* Create the function where you use a loop to get the 10 scores inputs, saving the input into an array.
* Create the function to display the scores on the page. For this you can use table.
* Create the function to calculate the average with, it's quite simple, just sum the 10 scores to a variable, then divide it by 10, there you have it.
Best of luck with the code : )
0
thanks man...