Shuffles the given array values.
✅
Immutable: This does not mutate the given array.
Syntax
import { shuffle } from '@opentf/std';
shuffle<T>(arr: T[]): T[]
Examples
shuffle([]) //=> []
shuffle([1]) //=> [1]
shuffle([1, 2, 3, 4, 5]) //=> [ 2, 4, 5, 1, 3 ]
shuffle('Apple') //=> [ 'p', 'e', 'A', 'l', 'p' ]