for each loop rails code example Example: iterate over array ruby # For Ruby arr = ['a', 'b', 'c'] arr.each { |item| puts item }