Skip to content

Instantly share code, notes, and snippets.

@jens1101
Created January 30, 2020 07:34
Show Gist options
  • Save jens1101/9c79fe74681bfc6991ce4d645bed0821 to your computer and use it in GitHub Desktop.
Save jens1101/9c79fe74681bfc6991ce4d645bed0821 to your computer and use it in GitHub Desktop.
JavaScript create an array of n size and fill it with random numbers
const n = 42
const array = [...Array(n)].map(() => Math.random())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment