Skip to content

Instantly share code, notes, and snippets.

@jamesliu96
Last active July 16, 2017 20:40
Show Gist options
  • Save jamesliu96/51d6b239355273d8e6ea to your computer and use it in GitHub Desktop.
Save jamesliu96/51d6b239355273d8e6ea to your computer and use it in GitHub Desktop.
Simple dice
function dice(n) { var d = []; while(n > 0) { d.push(Math.ceil(6 * Math.random())); n--; } return d.sort(); }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment