Help me with 4/9


var userChoice = prompt( "Do you choose rock, paper or scissors?")
var computerChoice = Math.random();
if (computerChoice <= 0,33){
computerChoice = "rock";
else if(computerChoice <= 0,66 && computerChoice >= 0.34){
computerChoice = "paper";}
else {
computerChoice = "scissors";}
console.log("Computer: " + computerChoice);

Why this booleans dont work??
for any computerChoice value it print only "rock"((
where is my mistake?


When you declared computerChoice, you forgot to have an input for the Math.random(), like so:

var computerChoice = Math.random(0,1);


i tried nothing changed((


You also forgot a semi colon at the end of your userChoice prompt:

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


thanks))) i changed) but it mistake didnt involve for my problem))


i thing something wrong with booleans but couldnt find mistake.


Try removing the second input on your else if statement, like so:

else if(computerChoice <= 0.66){
computerChoice = "paper";

And you also have commas instead of periods in your if statements (for the numbers)


thank you !!!!!!!!!!!! it help, i change all commas for periods, and now it work correct!!!


Yup, glad I could help.