Open
Conversation
HippErger
reviewed
Feb 1, 2018
| //return 'its a tie!'; | ||
| //} | ||
|
|
||
| function rockPaperScissors(hand1, hand2) { |
There was a problem hiding this comment.
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.
HippErger
reviewed
Feb 1, 2018
01week/rockPaperScissors.js
Outdated
| return 'tie'; | ||
| } else if (hand2 === 'scissors') { | ||
| return 'player 2 wins'; | ||
| else { |
There was a problem hiding this comment.
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.
HippErger
reviewed
Feb 1, 2018
01week/rockPaperScissors.js
Outdated
| else { | ||
| return 'try again'; | ||
| } | ||
| } |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
here's rock paper scissors