Create Arrays
Creating an empty array is super easy:
If you want an array to loop over:
If you want to create an array pre-filled with some content use the ES6 Array.prototype.fill
:
If you want to create an array of a predefined length with calls you can use the spread operator:
Last updated