Computer Choice: Part 2- I need help!


#1

Hello, I'm stuck in this part and I can't figure out what went wrong. Any ideas?

var userChoice = prompt ("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
console.log(computerChoice)
if (computerChoice<=0.33) {
computerChoice = "rock";
} else if (computerChoice<=0.66) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
}
}
computerChoise (0.999)


#2

Hey @alicesneg,

You have to take this out:


#3

I took it out but the code still doesn't makes sense. For example I got:

0.24322622222825885
"paper"

but 0.24322622222825885 should be rock, not paper. How is it possible?


#4

Why don't you try refreshing... and taking out the bottom bracket there that I didn't mention. :smiley:

Your code works fine, it seems. No problems like that at all. The problem is most likely that you have to refresh.