java rock paper scissors

Post on 17-Dec-2015

218 Views

Category:

Documents

1 Downloads

Preview:

Click to see full reader

DESCRIPTION

javascript code to play rock paper scissors. not worth reading, there are mistakes.

TRANSCRIPT

var userChoice = prompt("Do you choose rock, paper or scissors?");var computerChoice = Math.random();if (computerChoice < 0.34) {computerChoice = "rock";} else if(computerChoice

top related