fill in javascript code example
Example 1: fill array with values javascript
let filledArray = new Array(10).fill({'hello':'goodbye'});
Example 2: fill javascript
const a = new Array(100).fill("test");
console.log(a);
let filledArray = new Array(10).fill({'hello':'goodbye'});
const a = new Array(100).fill("test");
console.log(a);