Please help


#1

var userChoice= prompt("do you choose rock, paper or scissors?");
var computerChoice=Math.random();
if (computercChoice< 0.34) {
    computerChoce= "rock";
}
else if(computerChoice <=0.67);
}
computerChoice = "paper";
{
else {
    computerChoice = "scissors";
}
console.log(computer. " + computerChoice);
var compare = function(choice1,choice2) {
    if(choice1===choice2)
{
    return "the result is tie!";
}
else if(choice1==="rock")
{
    return "paper wins";
}
}
else if (choice1==="scissors")
{
    if(choice2==="paper")
{
else
{
return "scissors wins";
}
else
{
return "rock wins";
}
}
};
compare(userChoice,computerChoice)

#2

take a look at spelling on this line

take a look at syntax on this line

And overall take a look at your braces.you must have the same number of opening and closing braces


#3

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