- Plan your execution on white board before forking and cloning.
- Fork and clone this project.
- write unit tests for the generator
- calling
generate(1000)
should return an array that contains 1000 unique numbers (0-999) - generating the numbers twice should have a different order of numbers each time
- calling
- commit your work
- create a number generator that generates
n
many numbers - scramble the numbers
- make your tests pass
the function specification:
function name: generate
arguments:
amount - the amount of numbers to generate, counting from 0, to amount - 1
returns:
an array containing _`amount`_ many numbers in random order
File structure:
- Scrambled-Number-Generator
- generator.js
- spec/generator-spec.js
where generator.js
is the implementation
and spec/generator-spec.js
is the test script
(you'll need jasmine-node)
npm install jasmine-node -g
run automated tests by running
jasmine-node --autotest .