http://jsbin.com/ebageb/2/edit

codice:
var scelta1 = prompt("Giocatore1 scegli (1)Rock, (2)Paper or (3)Scissors");
var scelta2 = prompt("Giocatore2 scegli (1)Rock, (2)Paper or (3)Scissors");

function whowin() {
  var moves = {
    "1":"3",
    "2":"1",
    "3":"2"
  };

  if (scelta1 === scelta2) {
    return "Pareggio"; 
    /* pareggio */
  }
  else {
    return "Vince player " + 
           ((moves[scelta1] === scelta2)? "1" : "2");
  }
}

console.log(whowin());