Advertisement
Guest User

Untitled

a guest
Oct 9th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var compare = function(choice1, choice2) {
  2.     if(choice1 == choice2){
  3.         return "the result is a tie";
  4.     } else if(choice1 == "rock" && choice2 == "scissors"){
  5.         return "Rock wins";
  6.     }
  7.     else return "Paper Wins";
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement