Ruby Loop chacun avec un index
X.each_with_index do |item, index|
puts "current_index: #{index}"
end
Clumsy Capybara
X.each_with_index do |item, index|
puts "current_index: #{index}"
end
hash.each_with_index do |(key, value), index|
# ...
end