SyntaxError: Unexpected token { (SOLVED)


#1

Edit: Sorry, Just figured it out! Correct code is:

prompt("Do You Want To Choose: Rock, Paper, Or Scissors?")
var computerChoice = Math.random();
console.log(computerChoice);

if(computerChoice <=0.33) {
    computerChoice = "rock"
} else if(computerChoice > 0.33, computerChoice <= 0.66) {
    computerChoice = "paper"
} else {
    computerChoice ="scissors"
}

#2

What was the problem?
Also this probably works just fine:

computerChoice > 0.33, computerChoice <= 0.66

but chaining conditions with the comma operator makes them kind of pointless.
https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Operators/Comma_Operator
better use && instead or a the first statement already made sure that only values >0.33 are able to even reach the else if just delete this part: computerChoice > 0.33,