Question: https://jsfiddle.net/nLj2r3oo/2/ 1. create a varible named donationTotal set value to zero 2. apply the forEach() method to the donors array using the callback function calcSum()

https://jsfiddle.net/nLj2r3oo/2/

1. create a varible named donationTotal set value to zero

2. apply the forEach() method to the donors array using the callback function calcSum()

3. creat a var summaryTable storint the text of "

Donors donors
Total Donations$total
"; where donors is the lenght of the donors array and total is the value of the donation total apply the toLocalString() to donationTotal var so the total amount is displayed with a thousands seperator in the report

4. set the innerHTML property of the div element with the ID donationSummary to the value of the summaryTable Var

5. to show donors who donated $1000 or more use the filter() method with the call back function findMajorDonors() creat an array named majorDonors

6. in decending order apply the sort() method to the majorDonors var using the call back function donorSortDescending()

7. creat var named donorTablethat will store the HTML code for the table of major donors set inital value of the var tp the text "

;

8. create the HTML code for each donor row by applying the forEach() method to the majorDonors var using writeDonorRow as the callback function

9. add the text string

Major Donors
DonationDonor IDDateNameAddressPhoneE-mail
to the value of the donorTable var

10. set the innerHTML property of the div element with the ID donorTable to the value of the donorTable Var

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!