rand() function

Returns a random integer within the range specified by the minimum and maximum argument (inclusive).
This function takes two arguments.

Syntax

rand(min, max)

Arguments

min - an integer representing the smallest possible random number desired.
max - an integer representing the largest possible random number desired.

Example

rand(1, 10) → 8