how to fill array js code example
Example 1: fill array with values javascript
let filledArray = new Array(10).fill({'hello':'goodbye'});
Example 2: array fill
new Array(5).fill('element')
// ["element", "element", "element", "element", "element"]