Last active
April 28, 2016 02:49
-
-
Save himynameisdave/18b33fe4d416d0bd1e7d6ca2bc5716cf to your computer and use it in GitHub Desktop.
A shuffle one-liner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default shuffle = (arr) => arr.sort((a, b) => arr.map(Math.random)[a] - arr.map(Math.random)[b]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment