Skip to content

Instantly share code, notes, and snippets.

@pofulu
Created April 22, 2019 09:57
Show Gist options
  • Save pofulu/4b1ce89585e6362952f51d0182d713af to your computer and use it in GitHub Desktop.
Save pofulu/4b1ce89585e6362952f51d0182d713af to your computer and use it in GitHub Desktop.
隨機從陣列中選取一個元素
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