How to use Array.fill()
to your fill.
We have seen examples of how to use Array.fill()
to quickly fill data in an array. But, can we do more?
Yes..! You can generate array with sequential numbers. Use Array.fill()
to line up your number array in sequence.
|
|
Note technically an array.fill(), but you get it :)