Skip to content

Instantly share code, notes, and snippets.

View shihui1988's full-sized avatar

vichy shihui1988

View GitHub Profile
@shihui1988
shihui1988 / gist:609834ac7012847764b9db5b1c5ee7c8
Created September 26, 2016 10:59
How to build "Rock, Paper, Scissors" game? please help me debug my code.
/*var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67 && computerChoice
>=0.34) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("Computer: " + computerChoice);*/