Created
April 4, 2019 13:15
-
-
Save nandomoreirame/f6be3a5afa2e79b446896bec946280ed to your computer and use it in GitHub Desktop.
Returns a random number
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
/** | |
* 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