Skip to content

Instantly share code, notes, and snippets.

@nandomoreirame
Created April 4, 2019 13:15
Show Gist options
  • Save nandomoreirame/f6be3a5afa2e79b446896bec946280ed to your computer and use it in GitHub Desktop.
Save nandomoreirame/f6be3a5afa2e79b446896bec946280ed to your computer and use it in GitHub Desktop.
Returns a random number
/**
* Returns a random number
*
* @param {Number} length
* @return {Number}
*/
const randomNumber = length =>
Math.floor(Math.random() * length)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment