3

I am trying to get a random input for my rock paper scissors game, but the console just returns 0 every time I call the function.

function computerPlay() {
    options = ["rock", "paper", "scissors"]
    let computerSelection = Math.floor(Math.random(options.length));
    console.log(computerSelection);
}
Balagadoo
  • 35
  • 6

0 Answers0