Need help! What if choice1 is scissors?


#1

Okay, so I'm stuck on this part, and I've searched in the QnA Forum, other people have problems with this too, and I just can't find a way to do it, so please I'm not going to ask you whats wrong with my code, what I'm asking is, I need someone to paste the code how it's supposed to look, because I legitimately think my code is glitched in some way, I've spend so much time trying to figure it out, and it just tells me: "Problem with you syntax"...

I just need someone to give me the code as it's supposed to look, thanks in advance!!!


#2

Model this segment after the choice1 is 'rock' segment.

if (choice1 === 'scissors') {
    if ( ... what will scissors beat? ... ) {
        return 'scissors wins';
    } else {
        // what will beat scissors?
    }
}

#3

Nope, It won't work...
I listened to you and I did this:

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


#4

Your code looks correct. What error message are you getting?


#5

Im getting: Oops, try again. There was a problem with your syntax :confused:


#6

It may be something else in your code. Can you post your compare function?

Is there a error message in the console?


#7

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