Skip to content

Instantly share code, notes, and snippets.

@inodaf
Created January 12, 2021 19:42
Show Gist options
  • Save inodaf/a0decb7a7e3be2779108eeb16f1fe795 to your computer and use it in GitHub Desktop.
Save inodaf/a0decb7a7e3be2779108eeb16f1fe795 to your computer and use it in GitHub Desktop.
Generate an Array with Random Numbers in JavaScript
const generate = (length = 1000) => Array(length).fill().map(() =>
Math.floor(Math.random() * Math.floor(100))
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment