An Array is an ordered list. Items are stored with a numeric index, starting from 0. Arrays are commonly used for things like a shopping list, a list of users, or a list of scores.
ruby
fruits = ["Apple", "Banana", "Cherry"]
puts fruits[0]
fruits << "Durian"
puts fruits.last
puts "Total fruits: #{fruits.length}"
fruits.each_with_index do |fruit, index|
puts "#{index + 1}. #{fruit}"
endfruits[0] grabs the first item. << adds an item to the end of the array. .each_with_index gives you both the item and its index inside the loop.
You should see
Apple Durian Total fruits: 4 1. Apple 2. Banana 3. Cherry 4. DurianInfo
Remember that array indexes start at 0, not 1.