0036 Fill

To fill an array

The fill method is used to fill an array with a given value. The array instance is modified.

0036-fill_1.png

The fill method also takes a block for dynamic insertion.

0036-fill_2.png

Link to Ruby documentation for fill.