Rock, paper, scissors

When I got something that is different from the computer I got undefined, instead of ‘You won’ or ‘Computer won’. When I got the same thing it works normal.
Can someone help me?

In your determineWinner function, you have if blocks for handling ties and for handling user choice of “rock” and “paper”. But, you don’t have any block to determine winner if user choice is “scissors”.

In your playGame function, you have the statement
let userChoice = getUserChoice("scissors");
i.e. you have fixed “scissors” as the user choice. The computer choice is selected randomly. If the computer chooses “scissors”, then your determineWinner function returns the message that the game was a tie. But, when the computer chooses “rock” or “paper”, then determineWinner doesn’t return anything because you don’t have a block for handling user choice of “scissors”.