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:
- Display on the document the count of number of heads.
- Display on the document the count of number of tails.
- Display the heads count as a percentage on the document.
- Display the tails count as a percentage on the document.
- Save the file toss.html.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
