Advertisement
Guest User

Untitled

a guest
May 30th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. var compare = function(choice1, choice2); {
  2. if(choice1 === choice2)
  3. return"The result is a tie";
  4. }
  5.  
  6. else if(choice1 === "rock"); {
  7.  
  8. if(choice2 === "scissors") {
  9. return "rock wins";
  10. }
  11. else {
  12. return "paper wins";
  13. }
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement