Skip to content

Commit

Permalink
Updated code block deliamiters in rock_paper_scissors project (#26825)
Browse files Browse the repository at this point in the history
Co-authored-by: Swapnil <[email protected]>
  • Loading branch information
Swap2104 and Swap2104 authored Nov 27, 2023
1 parent 1fa6b06 commit f69fff9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions foundations/javascript_basics/project_rock_paper_scissors.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Don't forget to commit early & often! You can [reference the Commit Message less

5. **Important note:** you want to `return` the results of this function call, _not_ `console.log()` them. You're going to use what you `return` later on, so let's test this function by using console.log to see the results:

~~~javascript
```javascript
function playRound(playerSelection, computerSelection) {
// your code here!
}

const playerSelection = "rock";
const computerSelection = getComputerChoice();
console.log(playRound(playerSelection, computerSelection));
~~~
```

6. Write a NEW function called `game()`. Use the previous function _inside_ of this one to play a 5 round game that keeps score and reports a winner or loser at the end.
* You have not officially learned how to "loop" over code to repeat function calls... if you already know about loops from somewhere else (or if you feel like doing some more learning) feel free to use them. If not, don't worry! Just call your `playRound` function 5 times in a row. Loops are covered in the next lesson.
Expand Down

0 comments on commit f69fff9

Please sign in to comment.