4. Computer Choice: Part 2


#1

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 (0.34 < computerChoice <== 0.66) {
computerChoice = "paper";
}
else {
computerChoice = "scissors";
}

Please help, I am very stuck

In console it says:
SyntaxError: expected expression, got '='


#2

You don't need two = after the < hope this helps


#3

Thank you sooo much, have been trying for so long.
@bennett_2002


#4

Why do you use computeChoice but not return to get the rock paper or scissors?
for example else if (0.34 < computerChoice <= 0.66) {
computerChoice = "paper"