The _.shuffle() method creates an array of shuffled values from the given collection using a version of the Fisher-Yates shuffle algorithm.
_.shuffle( collection )
Parameters: This method accepts single parameter as mentioned above and described below:
- collection: This parameter holds the collection to shuffle.
Return Value: This method is used to return the new shuffled array.
[ 10, 9, 4, 2, 6 ]
[ 'sat', 'wed', 'fri', 'sun', 'thu', 'mon', 'tue']