Created
September 11, 2015 09:41
-
-
Save maxvipon/b021f33b9a4ce6be9de9 to your computer and use it in GitHub Desktop.
Random item from Array
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
items[ Math.floor(Math.random() * items.length) ] | |
items[ ~~(Math.random() * items.length) ] | |
items[ Math.random() * items.length >>> 0 ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment