Stuck at rock, paper, scissors


#1

Hi everyone, at "computer choice part 2" i have the code below, it give me "syntax error" but i really can't find where the syntax error is

var userChoice = prompt("Do you choose rock, paper or scissors?");
var computerChoice = Math.random();

if (computerChoice <= 0.33) {
    computerChoice = 'rock';
    } if else (computerChoice >= 0.34 && computerChoice <= 0.66) {
        computerChoice = 'scissors';
        } else {
        computerChoice = 'paper';
        }

#2

There is your culprit. else before if.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.