Iterate Two Arrays Simultaneously In Ruby
Join the DZone community and get the full member experience.
Join For Free// Iterate two arrays simultaneously in Ruby
array1.zip(array2).each do |v1, v2|
# iterates over array1 and array2
end
Opinions expressed by DZone contributors are their own.
Comments