Created
November 28, 2018 16:14
-
-
Save Farmatique/d5b2f89d899342e9939f07d699ba1a73 to your computer and use it in GitHub Desktop.
JS random number from set
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
function getRndmFromSet(set) | |
{ | |
var rndm = Math.floor(Math.random() * set.length); | |
return set[rndm]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment