create array with default values javascript code example
Example 1: fill array with values javascript
let filledArray = new Array(10).fill({'hello':'goodbye'});
Example 2: js create array with default value
Array(24).fill(0)
let filledArray = new Array(10).fill({'hello':'goodbye'});
Array(24).fill(0)