Generate a random integer 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 integer within the given bounds
Math
randomInt(0, 3); // 0, 1, or 2 Copy
randomInt(0, 3); // 0, 1, or 2
Generate a random integer within the given bounds.
Time complexity: O(1)
Space complexity: O(1)