randomIntArrayInRange
Generates an array of n random integers in the specified range.
- Use
Array.from()to create an empty array of the specific length. - Use
Math.random()to generate random numbers and map them to the desired range, usingMath.floor()to make them integers.