Generate a random number within the given bounds.
Time complexity: O(1)
Space complexity: O(1)
Lower bound (inclusive) of the output range
Upper bound (exclusive) of the output range
A random number within the given bounds
Math
const value = random(0, 10);0 <= value && value < 10; Copy
const value = random(0, 10);0 <= value && value < 10;
Generate a random number within the given bounds.
Time complexity: O(1)
Space complexity: O(1)