Finding out current index in EACH loop (Ruby)
x.each_with_index { |v, i| puts "current index...#{i}" }
X.each_with_index do |item, index|
puts "current_index: #{index}"
end
x.each_with_index { |v, i| puts "current index...#{i}" }
X.each_with_index do |item, index|
puts "current_index: #{index}"
end