Skip to content

Instantly share code, notes, and snippets.

@criaturaExperimental
Created July 6, 2019 10:24
Show Gist options
  • Select an option

  • Save criaturaExperimental/9836cb272a2b6f5ec3ba9cfa987d6900 to your computer and use it in GitHub Desktop.

Select an option

Save criaturaExperimental/9836cb272a2b6f5ec3ba9cfa987d6900 to your computer and use it in GitHub Desktop.
Generates an array with random numbers in javascript
randomArray = (length, max) => [... new Array(length)]
.map(()=> Math.round(Math.random() * max ));
let arr = randomArray(10, 100);
console.log(arr);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment