javascript array initialize of length 4 code example
Example 1: create array initialize size javascript
const array = new Array(4);
array.length //4
Example 2: create array initialize size javascript with value
new Array(4).fill({})
//[{},{},{},{}]