Question: Create a html document named toss.html. Write JavaScript code inside the html document to create an array of size 5, prompt the user to enter

Create a html document named toss.html. Write JavaScript code inside the html document to create an array of size 5, prompt the user to enter either head or tail, store the user response in the array, then process the array as following:

  1. Display on the document the count of number of heads.
  2. Display on the document the count of number of tails.
  3. Display the heads count as a percentage on the document.
  4. Display the tails count as a percentage on the document.
  5. Save the file toss.html.

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!