Hey guys! I am having trouble with my function game()…

I don’t know how to iterate my loop to add each score. I’m really stuck right here! This is what I have so far…any advice would be greatly appreciated!

var rock; var scissors; var paper; function computerPlay(){ const myArray = ['rock', 'paper', 'scissors']; return myArray[Math.floor(Math.random() * myArray.length)]; } function playRound (playerSelection, computerSelection){ if (playerSelection == computerSelection){ return 'It is a tie!'; }else if (playerSelection == 'rock' && computerSelection == 'scissors'){return'You win!' } else if (playerSelection == 'paper' && computerSelection == 'rock'){return 'You win!' } else if (playerSelection == 'scissors' && computerSelection == 'paper'){return'You win!' } else return 'Computer wins!'; } function game(){ for (let i = 0; i < 5; i++){ let computerScore = 0; let playerScore = 0; let computerSelection = computerPlay(); let playerSelection = prompt('pick your weapon'); let roundResult = playRound(playerSelection, computerSelection); console.log(roundResult); }