4.17.11
3.10.1
2.4.2
1.3.1
_.shuffle(collection)
Creates an array of shuffled values, using a version of the Fisher-Yates shuffle.
Since
0.1.0
Arguments
argument
collection
type
(Array|Object)
description
The collection to shuffle.
Returns
(array)
Example
_.shuffle([1, 2, 3, 4]);
// => [4, 1, 3, 2]
_.shuffle([1, 2, 3, 4]);
// => [4, 1, 3, 2]