Question: Using the coin flip file form class, create a web page that will allow the user to toss a coin as often as desired. Use

Using the coin flip file form class, create a web
Using the coin flip file form class, create a web
Using the coin flip file form class, create a web page that will allow the user to toss a coin as often as desired. Use the Math.random() function to determine the result, where () = heads and 1 = tails. If the user's guess matches the computer's toss, the user wins. Use the coin images from D2L to display the winning result. Save your page as coin_toss.html.

Coin Flip

function coinFlip() { var heads = ""; var flip = Math.floor(Math.random()* 2); if (flip == 0) { flip - heads; document.getElementById("coin").innerHTML } else{ flip = tails; document.getElementById("coin").innerHTML } }

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!