Rock, paper and scissors game


Can someone tell me if their code indicates who wins because my code didn't, despite calling the function: compare("userChoice", computerChoice)


You need to use userChoice not "userChoice". userChoice would be a variable that you assigned "rock", "paper" or "scissors" to by using the prompt and "userChoice" is just a the word "userChoice". As there is no case dealing with this word you probably don't see a result or undefined if you'd wrap your function call in a console.log.