Created
October 21, 2019 15:36
-
-
Save epjuan21/03d8c19f36c9ba7d095f09a200e047f7 to your computer and use it in GitHub Desktop.
Fulfill array with data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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