Policies & Guidelines

RANDOM_INTEGER_BETWEEN

Random integer between two values

Description

Given two integers, returns a random integer between them. The range is inclusive, meaning that the returned value may be equal to either the start or the end value.

Function signature

RANDOM_INTEGER_BETWEEN(min: Number, max: Number) => Number

Parameter

Description

Min

Number to start

Max

Number to end

Examples

Formula

Return value

RANDOM_INTEGER_BETWEEN(1,100)

58

RANDOM_INTEGER_BETWEEN(100,1)

73

RANDOM_INTEGER_BETWEEN(1,10)

6

RANDOM_INTEGER_BETWEEN(24,120)

114