Result is inclusive of both the min
and max
arguments.
const randomIntegerInclusive = (min, max) =>
Math.floor(Math.random() * (max - min + 1) + min);
Result is inclusive of both the min
and max
arguments.
const randomIntegerInclusive = (min, max) =>
Math.floor(Math.random() * (max - min + 1) + min);