Generates a random integer between the specified minimum and maximum values (inclusive).
A random integer between the specified minimum and maximum values.
const randomInt = getRandomInt(1, 10);console.log(randomInt); // Outputs a random integer between 1 and 10
The minimum value (inclusive) of the range.
The maximum value (inclusive) of the range.
Generates a random integer between the specified minimum and maximum values (inclusive).
Returns
A random integer between the specified minimum and maximum values.
Example