I'm trying to figure out whether I should avoid looping through arrays this way if I only want its specific sections.
the_count = [1, 2, 3, 4, 5]
fruits = ["apples", "oranges", "pears", "apricots"]
for number in the_count
puts "This is count #{number}"
end
fruits.each do |fruit|
puts "A fruit of type: #{fruit}"
end
Thanks in advance!