-
-
Save arminsebastian/9880bc3d0a60d3356f5b to your computer and use it in GitHub Desktop.
Rock Paper Permutation
This file contains 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
/* | |
* Write a function that generates every sequence of throws a single | |
* player could throw over an n round game of rock-paper-scissors. | |
* | |
* For 3 rounds your output should look something like: | |
* [["r", "r", "r"], | |
* ["r", "r", "p"], | |
* ["r", "r", "s"], | |
* ["r", "p", "r"], | |
...etc... | |
] | |
* | |
* - Make your function return answers for any number of rounds. | |
* Example: | |
* rockPaperScissors(5); // => [['rock', 'rock', 'rock', 'rock', 'rock'], etc...] | |
* | |
*/ | |
var rockPaperScissors = function (roundCount) { | |
// TODO: your solution here | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment