4/9 Cannot figure out what's wrong


#1

var userChoice = prompt("Do you choose rock, paper or scissors?")
var computerChoice = Math.random();
if (computerChoice >= 0 && computerChoice <=.45) {
computerChoice = "rock";
} else if (computerChoice >=.46 && computerChoice <= .90) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}

I checked the code 50 times, but prompt keeps saying "Did you make one of your ranges end at .33?" and won't let me proceed.


#2

There are three ranges in all. The lower 1/3, bounded by 0.33, the middle 1/3, bounded by 0.67, and the top one-third which is the default if the other two ranges are lower than computerChoice.

if (computerChoice <= 0.33) {
    // rock
} else if (computerChoice < 0.67) {
   // paper
} else {
    // scissors
}

Provided we keep this order, everything is correct.