4. Computer Choice Part2



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

Can anyone help me please?


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

Otherwise, we seem to have the same issue.

  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.


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.


Thank you so much :slight_smile: