Skip to content

Instantly share code, notes, and snippets.

@spasiu
Created June 7, 2022 14:29
Show Gist options
  • Save spasiu/82493a815503889fa8f4102c0dd8dd15 to your computer and use it in GitHub Desktop.
Save spasiu/82493a815503889fa8f4102c0dd8dd15 to your computer and use it in GitHub Desktop.
function getRandomNumber(cb) {
setTimeout(() => cb(random()), random());
}
function random() {
return Math.round(Math.random() * 1000);
}
// generate an array of 64 random numbers using the getRandomNumber function. Each elment in the array must be guaranteed unique.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment