1new Array(5).fill('element')
2// ["element", "element", "element", "element", "element"]
1Array.from({length: 3}, (_, i) => i); //[0,1,2]
2[...Array(3)].map((_, i) => i); //[0,1,2]
1var arry = ["JavaScript", "Fill", "this", "Array"];
2arry.fill("Filled", 1, 3);
3
4console.log(arry);
5//Output: [‘JavaScript’, ‘Filled’, ‘Filled’, 'Array’]
6
1const tempArr = new Array(2000).fill({ "tile": "oh fuck this sheet", "content": "some fucked up palce hodler texte here let's do this sheet" })