flip a coin' code example
Example 1: Flip a coin
var rand = ['Heads', 'Tails'];
var randOption = rand[Math.floor(Math.random() * rand.length)];
console.log(randOption);
Example 2: coin flip
//Use this at the top
using System;
//Put this under code
Random rnd = new Random();
string Answer = "Head";
if (rnd.Next(0,2) == 1)
{
Answer = "Tails" ;
}