File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -106,12 +106,18 @@ function hungryDog(/*add your code here*/){
106106
107107
108108/*🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 Task 4 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀*/
109- // Rock, Paper, Sissors
110- // Your function should take a string (either rock paper or sissors)
111- // it should return you won or you lost based on the rules of the game (you may need to look up the rules if you have not played before)
112- // use math.random to determine the computers choice
113- // hint while you can complete this with only conditionals based on strings it may help to equate choice to a number
114109
110+ // Rock, Paper, Scissors - Let's play against the computer!
111+ /*
112+ Use the game function below to do the following:
113+ 1. Receive a string that represents the user's choice (either rock, paper, or scissors)
114+ 2. Use Math.random to determine the computers choice (Math.random gives a random number between 0 and 1)
115+ 3. Return and console log whether the user won, lost, or tied based on these rules of the game
116+
117+ RULES OF THE GAME: Scissors beats Paper | Paper beats Rock | Rock beats Scissors | Or there's a tie
118+
119+ HINT: While you can complete this with only conditionals based on strings, it may help to equate choice to a number when using Math.random()
120+ */
115121
116122function game ( /*add your code here*/ ) {
117123 /*add your code here*/
You can’t perform that action at this time.
0 commit comments