To fill an array
The fill
method is used to fill an array with a given value. The array instance is modified.
The fill
method also takes a block for dynamic insertion.
Link to Ruby documentation for fill
.
The fill
method is used to fill an array with a given value. The array instance is modified.
The fill
method also takes a block for dynamic insertion.
Link to Ruby documentation for fill
.