I'm currently building a Rock, Paper, Scissors game using JS and HTML. I'm working on having the computer select rock, paper, or scissors randomly. The script is then supposed to print the computer choice to my user interface. When I try and test-run this, I get the following error: Uncaught ReferenceError: Cannot access 'computerChoice' before initialization
I've included some of my code below.
let computerSelection = Math.random();
if (computerSelection < 0.33) {
computerChoice = "rock";
} else if (computerSelection < 0.66) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}
let computerChoice = "";