9. Next Steps, SyntaxError: Unexpected token


#1

Any help would be much appreciated! I'm trying to get new choices on a tie, I'm sure the error is from the beginning of the 3rd line but I can't figure out the syntax needed to get this done using only the commands given until this point.

var computerChoice;
var userChoice;
var Run = (userChoice = prompt("Do you choose rock, paper or scissors?");
computerChoice = Math.random();
if (computerChoice < 0.34) {
computerChoice = "rock";
} else if(computerChoice <= 0.67) {
computerChoice = "paper";
} else {
computerChoice = "scissors";
} console.log("User: " + userChoice);
console.log("Computer: " + computerChoice);
);
Run;
var compare = function(choice1, choice2) {
if (choice1 === choice2) {
console.log("It was a tie! Try again!");
Run;
} else if (choice1 === "rock") {
if (choice2 === "scissors") {
return "rock wins";
}
else {
return "paper wins";
}

} else if (choice1 === "paper") {
    if (choice2 === "rock") {
        return "paper wins";
    }
    else {
        return "scissors wins";
    }
} else if (choice1 === "scissors") {
    if (choice2 === "paper") {
        return "scissors wins"; 
    }
    else {
        return "rock wins";
    }
}

};
compare(userChoice, computerChoice);


#2

Will skip over indefinitely and keep look here tomorrow morning till someone replies! Cheers!


#3

Rather sums it up. Fortunately this lesson does not have an SCT and we can come back to it whenever we want. The author is compelling us to return to this project once we have more tools under our belt, not necessarily immediately. Don't let this steer off your learning path and continue ahead. This project will still be here when you return.