Created
December 21, 2016 06:11
-
-
Save shotasenga/e539aa8bffbab83c594adf3cc6b2ab4f to your computer and use it in GitHub Desktop.
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
'use strict'; | |
/** | |
* shuffle an array | |
* | |
* @param {Array} arr | |
* @return {Array} | |
*/ | |
export default (arr) => arr.sort( s => .5 - Math.random()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment