From what I can tell (and I'm not the best at Javascript, so I might be wrong or missing something) - your script works, but the console.log() command at the end is putting the answer into the JavaScript console log. If you're not looking at the console, it looks like there isn't an answer at all, so if you wanted the answer to come up in a prompt window sort of thing, you'd have to use alert() instead of console.log().
Edit: Also forgot, the variables that you're using at the end are incorrect. You should be comparing the user and computer choices, not choice1 and choice2.
So, combined with the previous stuff I said, if you want the answer to come up as an alert, you'd be changing the console.log(compare (choice1, choice2)) to alert(compare (userChoice, computerChoice)). You could still keep the answer recorded in the console log if that's what you wanted to do, but either way the variables need to change for it to work.