ruby how to loop through an array
# Define an array
my_array = [1, 2, 3, 4, 5]
# Use the each method to iterate through the array
my_array.each do |element|
# Inside the block, perform actions for each element
puts "Current element: #{element}"
end