Question: I need help with exercise 3-2 from Murach's Javascript and JQuery. Average Test Scores var entry; var average; var scores = []; var total =
I need help with exercise 3-2 from Murach's Javascript and JQuery.
Thanks for using the Test Scores application!
Enhance the Test Scores In this exercise, you'll make an enhancement to the Test Scores application in figure 3-17 that uses an array. What you'll do is add a for loop that gets 4. Add a second for loop right before the alert statement at the end of the te This for loop should be executed once for each score in the array. With loop, an if statement should replace the value in the highestScore variante with the current score if that score is greater than the value in highest 5. Modify the alert statement that follows the for loop so it displays both 6. When you've got that working, comment out the second for loop. Then modify the first for loop so it not only sums the scores but also highest score in the highest Score variable. After this change, the apoio highest score in the array and displays it below the average score in the alien That way, the highest Score variable will eventually store the highest sur 110 Suche navel Exercise 3-2 application dialog box: 2 90 Per page from eating additional dialog OK If you have any problems when you're testing, remember to use Chrome's developer tools as shown in figure 1-16 of chapter 1 1. Open your text editor or IDE. Then, open this HTML file and review is cut javascript jquery exercises\ch03\acoras_array.html 2. Test the application with valid entries, and note the result. Then, test it with invalid entries, and note the result. 3. Declare a variable named highest Score at the start of the script that will be used to store the highest score. Its starting value should be zero the array, average score and highest score as shown above. should work the same as it did after step 5. puts
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
