Skip to content

Instantly share code, notes, and snippets.

@jeanpierreb
Created May 19, 2015 18:02
Show Gist options
  • Save jeanpierreb/745de7e6d6484fd01e57 to your computer and use it in GitHub Desktop.
Save jeanpierreb/745de7e6d6484fd01e57 to your computer and use it in GitHub Desktop.
function randomNumberGenerator (max, count) {
var set = Array.apply(null, {length: count}).map(Function.call, Math.random);
for(var i in set) set[i] = Math.floor(set[i] * max) + 1;
return set;
}
var output = randomNumberGenerator(500, 50);
console.log(output);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment