Skip to content

Instantly share code, notes, and snippets.

@rjbultitude
Created October 15, 2019 21:24
Show Gist options
  • Save rjbultitude/2d097b8106db0d25a391a3e7f3d2b631 to your computer and use it in GitHub Desktop.
Save rjbultitude/2d097b8106db0d25a391a3e7f3d2b631 to your computer and use it in GitHub Desktop.
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
function generateRandomNumbers(length) {
var numArray = [];
for (var i = 0; i < length; i++) {
numArray[i] = getRandomInt(1, 10000);
}
return numArray;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment