Help with 4/9


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()


if (computerChoice<=0.33); {
else if (computerChoice>=0.34 && computerChoice<=0.66); {
else (computerChoice>=0.67 && computerChoice<=1);


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.


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.