randomIntegerInRange
Generates a random integer in the specified range.
- Use
Math.random()
to generate a random number and map it to the desired range. - Use
Math.floor()
to make it an integer.
Generates a random integer in the specified range.
Math.random()
to generate a random number and map it to the desired range.Math.floor()
to make it an integer.