Randomize List | ARRAY_RANDOMIZE

Syntax

ARRAY_RANDOMIZE( [input] )

Parameters

input
The ARRAY whose items will be shuffled.

Return Value

A resorted array.

Description

Sorts an array into random order. The resulting array will be the same length as the original array. INPUT is not affected. Any input value that is not an array will be coerced into an array in the output.

Examples

ARRAY_RANDOMIZE([1, 2, 3, 4]) # returns [3, 4, 1, 2]
ARRAY_RANDOMIZE('test') # returns [ 'test' ]