Policies & Guidelines

SHUFFLE

Shuffle an array

Description

Returns an array containing all the values from the array parameter, but shuffled into a random order.

Function signature

SHUFFLE(array: Array) => Array

Parameter

Description

Array

Array to shuffle

Examples

array1 = ["a","b","c","d","e"]
array2 = ["a","b","c",1,2,3]

Formula

Return value

SHUFFLE([])

[]

SHUFFLE(array1)

["b","c","a","e","d"]

SHUFFLE(array2)

["1","b","2","a","c","3"]