Skip to content

Instantly share code, notes, and snippets.

@epjuan21
Created October 21, 2019 15:36
Show Gist options
  • Save epjuan21/03d8c19f36c9ba7d095f09a200e047f7 to your computer and use it in GitHub Desktop.
Save epjuan21/03d8c19f36c9ba7d095f09a200e047f7 to your computer and use it in GitHub Desktop.
Fulfill array with data
// Fulfill array with data
var newArray = new Array(10).fill(“1”);
console.log(newArray); // returns [“1”, “1”, “1”, “1”, “1”, “1”, “1”, “1”, “1”, “1”, “1”]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment