Answers for "Coin toss with JavaScript and HTML"

0

Coin toss with JavaScript and HTML

var prob1 = Math.floor(Math.random() * 2) +1;

var prob2 = Math.floor(Math.random() * 2) +1;

if( prob1 === prob2){
   document.write('You Got TAIL');
 }else{
   document.write('You Got HEAD');
Posted by: Guest on July-13-2021

Browse Popular Code Answers by Language