shuffle

shuffle

Return a shuffled version of an array

Import

import { shuffle } from '@fullstacksjs/toolbox';

Signature

function shuffle<T extends any[]>(arr: T): T {}

Examples

shuffle([])        // []
shuffle([1])       // [1]
shuffle([1, 2, 3]) // Who knows?