- Fork and clone this repository.
- Change into the new directory.
- Create and checkout a new branch, named
response
. - When finished,
git add
,git commit
,git push
to your fork and submit a pull request.
-
Rock, Paper, Scissors (watch the game)
- Create a file in this repo named
rps.js
- Write a function that takes
rock
,paper
, orscissors
as an argument for the user choose, then choosesrock
,paper
, orscissors
randomly for the computer choose, and returns whether the userwin
,lose
, or `tie. - Example:
playGame('rock') // Computer picked: paper. User picked: rock. User lose.
- Hint: Javascript includes a
Math.random
method.
- Create a file in this repo named
-
Dice Roller
- Create a file in this repo and name it
dice.js
- Write a function that chooses two random numbers (1-6) and returns them. It should also return the sum.
- Example:
rollDice() // Dice rolled are 6 and 1. Sum is 7
- BONUS: have your function take an argument of the # of dice to be rolled.
- Example:
rollDice(3) // Dice rolled are 4, 2, and 7. Sum is 13.
- Create a file in this repo and name it
-
Research 3 string methods and describe what they are used for and how to use them. You can find string methods here https://www.w3schools.com/js/js_string_methods.asp
Method 1
Name:
Description:
Example using it:
Method 2
Name:
Description:
Example using it:
Method 3
Name:
Description:
Example using it:
- All content is licensed under a CCBYNCSA 4.0 license.
- All software code is licensed under GNU GPLv3. For commercial use or alternative licensing, please contact [email protected].