Undefined error, Step 11 of Rock Paper Scissors

I’m getting an undefined error and my brain just can’t. Why am I getting an undefined error when I test my function?

Thank you!

You seem to have an extra { on line 27.
if (userChoice === computerChoice){{
(I think the extra { makes the return after this line unreachable based on the warning I saw.)

and there may be one { missing on line 37.
if (userChoice === 'paper')

Thank you! How did you figure it out so fast? I’ve been looking at it for an hour!

I ran the code, and looked if any errors or warnings came up (even a Codebyte shows some useful stuff, although a CodeByte is not a great way to test code).

Also, some rules of thumb I used …
if-statement declarations usually would have only one { immediately afterward;
and your style seemed to be to put exactly one each time in most of the other cases [except the other one I spotted].

I also tried to follow along with how the code was indented to try to figure out where the if-blocks and loops should start and end.
(And I tried to follow the logic of the rock-paper-scissors game.)