So, my code worked perfectly, but i kept getting some error along the lines of "your code returns X instead of 'undefined'"After rewriting my entire code to another one that works perfectly i rearranged some of the code and suddenly, with the exact same program returning the exact same code, the check mechanism gave in after like 5 tries.

Oops, try again. Your code returned 'paper wins!' instead of 'undefined' when the inputs are scissors and rock