function getComputerChoice() {
return rock || paper || scissors, Math.floor(Math.random() * 3);
let rock = 0
let paper = 1
let scissors = 2
if (0) {
return "rock"
} else if (1) {
return "paper"
} else {
return "scissors"
}
}
I tried what I included above and I expected the log to bring up either rock, paper, or scissors but it's only bringing up the random number! I tried moving the variables to the beginning of the code but that made no difference in the results.
0 comments:
Post a Comment
Thanks