<!DOCTYPE html><html><body> <!– replace the text below with your name!–> <!– –> <!– –> <title> TYPE YOUR NAME HERE</title><script>//// A bug collector collects bugs every day for five days. Write a function that keeps// a running total of the number of bugs collected during the five days. The loop// should ask for the number of bugs collected for each day, and when the loop is// finished, the program should display the total number of bugs collected.//function countBugs() {/////////////////////////////////////////////////////////////////////////////////// Insert your code between here and the next comment block. Do not alter //// any code in any other part of this file. ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Insert your code between here and the previous comment block. Do not alter //// any code in any other part of this file. ///////////////////////////////////////////////////////////////////////////////////}alert(‘Over the past five days, ‘ + countBugs() + ‘ bugs were collected’);</script></body></html>
Expert Answer
Answer to TYPE YOUR NAME HERE // // A bug collector collects bugs every day for five days. Write a function that keeps // a runni…