Build JS function that generates random numbers with given conditions
Budget: $10 – $30 USD
I am looking for a developer to create a JS function that creates an array of objects. There are conditions for this function:
1) Range - the numbers should be in range from 2-12.
2) Array length - it has to produce exact length every time the function runs (more details within the private message).
3) Output - each object should contain two keys:
a) number: with value between 2 - 12
b) randomNumber: with value between 2-12
The output should not contain the same numbers (when replacing the values), so the example shown below has the incorrect output:
1) { number: 4, randomNumber: 6 }
2) { number: 6, randomNumber: 4 }
There are additional conditions for the number object (f.e. number: 4 should appear at least 2 times but no more than 4 times). Each number object from range between 2-12 has different conditions (more details in the private message).
1) Range - the numbers should be in range from 2-12.
2) Array length - it has to produce exact length every time the function runs (more details within the private message).
3) Output - each object should contain two keys:
a) number: with value between 2 - 12
b) randomNumber: with value between 2-12
The output should not contain the same numbers (when replacing the values), so the example shown below has the incorrect output:
1) { number: 4, randomNumber: 6 }
2) { number: 6, randomNumber: 4 }
There are additional conditions for the number object (f.e. number: 4 should appear at least 2 times but no more than 4 times). Each number object from range between 2-12 has different conditions (more details in the private message).