Created
April 22, 2019 09:57
-
-
Save pofulu/4b1ce89585e6362952f51d0182d713af to your computer and use it in GitHub Desktop.
隨機從陣列中選取一個元素
This file contains 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 RandomNext(array) { | |
return array[Math.random() * array.length | 0]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment