_.random([lower=0], [upper=1], [floating])
Produces a random number between the inclusive
upper bounds. If only one argument is provided a number between
0 and the given number is returned. If
true, or either
upper are floats, a floating-point number is returned instead of an integer.
[lower=0](number): The lower bound.
[upper=1](number): The upper bound.
[floating](boolean): Specify returning a floating-point number.
(number): Returns the random number.
_.random(0, 5); // => an integer between 0 and 5 _.random(5); // => also an integer between 0 and 5 _.random(5, true); // => a floating-point number between 0 and 5 _.random(1.2, 5.2); // => a floating-point number between 1.2 and 5.2