Computer Choice Exercise 1.3. Need of help


#1

var userChoice = prompt("Do you choose rock, paper, or scissors?");

var computerChoice = Math.random(1);

if (computerChoice <= 0.33){
computerChoice = "rock";
} else if (computerChoice <= 0.67 && computerChoice >= 0.34) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}
Then it will say :
Oops, try again. Did you set var computerChoice = Math.random() ? The capital 'M' in 'Math' is important!
Am i forgetting something?


#2

A simple expression will do the job, here. Since the first branch channels everything 0.33 and below, the second branch will only see values greater than 0.33. This means we do not have to test the lower bound, only the upper bound.

else if (computerChoice < 0.67){