shuffleArray()function

shuffleArray(items: PossibleArray<T>): ImmutableArray<T>
ParamType
itemsPossibleArray<T>
The array or iterable to shuffle. required
Return
ImmutableArray<T>
A new array containing the same items in random order.

Return a shuffled version of an array or iterable.

Examples

shuffleArray([1, 2, 3]); // e.g. [2, 3, 1]