ruby loop array with index code example Example: ruby iterate over array # For Ruby arr = ['a', 'b', 'c'] arr.each do |item| puts item end