How to set the result in a loop. Building the game: rock, paper, scissors

I am working on a game of rock, paper, scissors in the course “The Odin Project.” Unfortunately, I’ve been at a standstill for several days because I can’t figure out how to set the outcome of the duel. I am uploading my code below. I am a beginner so please understand 🙂 I would appreciate your help.

https://github.com/RadekLewandowski/rock-paper-scissors/blob/6f60d9721a3f7e7835e5e9254cb26fcb766bedc2/script.js