4. Computer Choice: Part 2


#1

I type this code:
var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice= Math.random();
console.log(computerChoice)
if(computerChoice>=0 &&
computerChoice<0.33){
computerChoice = "rock";
}
if else(computerChoice < 0.67){
computerChoice = "paper";
}
else{
computerChoice = "scissors";
};

And "I get SyntaxError: Expected '('" and "Oops, try again. There was a problem with your syntax."

What's wrong?

`


#2

Its actually else if.. :wink:


#3

Thank you! I feel so stupid right now!


#4

Dont worry... Everyone makes mistakes.