6. Array

6.3 Array to collect things and use each to print each item

An array holds a number of items. In this example the array is holding things I like.

Array has a special thing called each.

Array also has do end block. In the do end block we can print the item name one by one.

Let’s print items of array one by one.