Skip to content

Class2 rock paper scissors#2

Open
shayhoffman wants to merge 6 commits intogh-pagesfrom
class2-rockPaperScissors
Open

Class2 rock paper scissors#2
shayhoffman wants to merge 6 commits intogh-pagesfrom
class2-rockPaperScissors

Conversation

@shayhoffman
Copy link
Owner

here's rock paper scissors

//return 'its a tie!';
//}

function rockPaperScissors(hand1, hand2) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pull request has two files in it For now we're only working on one file at a time. Please make sure your PR have only one file.

return 'tie';
} else if (hand2 === 'scissors') {
return 'player 2 wins';
else {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This else on line 35 should be outside the if block on 29 not outside the previous else if block on line 33. This is throwing an error and is not running your game.

else {
return 'try again';
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please go back through the syntax of if/else if/else. I can help you better in person but on your own just look at how the if () {} block works before the else if() {} then how the else {} block works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants