Change for loop to while loop in game
This commit is contained in:
parent
97fb86c4b5
commit
b51cc86282
1 changed files with 1 additions and 1 deletions
|
|
@ -50,7 +50,7 @@ function game() {
|
||||||
let p = 0;
|
let p = 0;
|
||||||
let c = 0;
|
let c = 0;
|
||||||
|
|
||||||
for (var i = 0; i < 5; i++) {
|
while (p < 5 && c < 5) {
|
||||||
const ps = prompt("Rock, Paper, or Scissors?");
|
const ps = prompt("Rock, Paper, or Scissors?");
|
||||||
const cs = getComputerChoice();
|
const cs = getComputerChoice();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue