In this coding challenge, you will be implementing a function called randomInRange(min, max)
that generates a random integer between a given minimum value (inclusive) and a maximum value (exclusive). The function should take two arguments, min
and max
, both of which are integers.
- The minimum value is
inclusive
and the maximum value isexclusive
. - Assume that this statement is always true
min < max.
const randomInt = randomInRange(1, 10);
console.log(randomInt); // output: a random integer between 1 and 9