4. Computer Choice Part2


#1


https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661#


I'm stuck here. the message error says there was a problem with your syntax, but i don't know what is this problem?!!

var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();
//console.log(computerChoice);
if(computerChoice<0.34){
    computerChoice ="rock";    
};
else if(computerChoice>=0.34&&computerChoice<0.66){
    computerChoice ="paper";    
};
else (computerChoice > 0.67){
computerChoice = "scissors";
};

Can anyone help me please?


#2

Is there supposed to be comment lines in front of the console.log?

Otherwise, we seem to have the same issue.


#3
  1. On the closing bracket for if and else if you shouldn't put semi colons ; remove them.
  2. You have a condition for else remove the condition as else doesn't take a condition as: else is carried out if it doesn't meet if or else if requirements.

#4

No it isn't supposed, this line of code was required at the previous lesson.
so I stopped it at this lesson by using comment.


#5

Thank you so much :slight_smile:


#6