It's possible to use
Array.fill to create an Array with a pre-defined size and then use
Array.map to populate the items with a default value, like integer or string.
It's also possible to populate the array with an object, but we will require to use another function because
Array.fill just copy a reference to the original object without creating multiple unique objects. To solve this we can use
Other way to solve the same problem is by using a for loop, but this is a mutable method.
Also, we can use
Array.from or the array spread syntax in combination with the