Skip to main content

randomInteger

Generates a random integer number between 0 and the supplied number - 1

Syntax

integer = randomInteger(max)

This returns an integer between 0 and max-1

Example

// random number between 1 and 10
random = randomInteger(10) + 1