Help with 4/9


#1

can some one please tell me whats wrong this this, it says error message unexpected token else;

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.34 && computerChoice<=0.66); {
computerChoice="paper";
}
else (computerChoice>=0.67 && computerChoice<=1);
computerChoice="scissors";
}


#2

The problems are the semicolons after the conditions, here is a link with more information:


and the fact that else never has a condition as it is the default case.


#3

In simpler terms to what @haxor789 means is, you will never give an 'else' a condition.

else (computerChoice>=0.67 && computerChoice<=1);

is a no-no. Also there's no opening bracket there either.

`
else { ... }

else statements will always be structured the same way every time, no condition statement after the else. I hope this helps.

@haxor789, sorry for stealing your thunder.