Web Design
**The question is in the attached file**
Write a JAVA SCRIPT that simulates the tossing of 10 coins.
· There should be a separate function flip that takes no arguments and returns false for tails and true for heads and heads and tails are decided based on a random value.
· There should be a
Toss
button.
· Let the program toss all the 10 coins each time the user clicks the Toss button.
· Display the results in a table that shows for each toss the frequency of Heads and frequency of Tails and the percentage based on the total tosses.
· For each of the coin toss, show a picture of all the 10 coins with the correct side (Heads or Tails ) based on the toss result.
· Every time you click on the Toss button the frequencies have to be updated in the table and the percentages respectively.
· Note: If the program realistically simulates the coin tossing each side of the coin should appear approximately 50%.
· Include the two images and as usual the source of the images in comments.
· Have an appropriate heading for the page and for the table.