Coding Challenge: You are given a random number generator that will give you a number between 9 and 20 inclusive. You need a random number between 1 and 100 inclusive instead. How do you convert one to the other? The Ideal answer will be in Javascripts with tests.
The solution is a Random Number Generator in index.js
. Tests are in test/main.js
To run project:
- Clone the project into a dir, cd in the dir, and run
npm install
- In the dir via the terminal, run
node index.js
to run the code and see results, you can change the args passed tomain()
- To run tests, use
npm run test
.