Change for loop to while loop in game

This commit is contained in:
lolabird 2023-11-07 12:19:52 -07:00
commit b51cc86282

View file

@ -50,7 +50,7 @@ function game() {
let p = 0;
let c = 0;
for (var i = 0; i < 5; i++) {
while (p < 5 && c < 5) {
const ps = prompt("Rock, Paper, or Scissors?");
const cs = getComputerChoice();