Policies & Guidelines

GENERATE_RANGE

Constructs an array with generated numbers

Description

Constructs an array with consecutive numbers, from the start number to the end number.

By default, the numbers are incremented by 1, but you can override this with the optional third parameter.

Function signature

GENERATE_RANGE(start: Number, end: Number, step: Number = 1) => Array

Parameter

Description

Start

Start number

End

End number

Step

Step number

Examples

Formula

Return value

GENERATE_RANGE(0,5)

[0,1,2,3,4,5]

GENERATE_RANGE(5,0,-1)

[5,4,3,2,1,0]

GENERATE_RANGE(1,12,3)

[1,4,7,10]