3. Below the script element you just created, insert another script element that contains the function amountTotal(). The purpose of the amountTotal() function is to return the sum of all of the values in the amount array. There are no parameters for this function. Add the following commands to the function:
a. Declare a variable named total, setting its initial value to 0.
Save your time - order a paper!
Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlinesOrder Paper Now
b. Create a For loop that loops through all of the values in the amount array. At each iteration of the loop, add the current value of the array item to the value of the total variable.
c. After the For loop is completed, return the value of the total variable.
PLACE THIS ORDER OR A SIMILAR ORDER WITH BEST NURSING TUTORS TODAY AND GET AN AMAZING DISCOUNT
The post Declare a variable named total, setting its initial value to 0. appeared first on BEST NURSING TUTORS .