fill all elements of new array with number javascript code example
Example 1: fill array with values javascript
let filledArray = new Array(10).fill({'hello':'goodbye'});
Example 2: js fill array with count elements
Array(3).fill(4); // [4, 4, 4]