DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Iterate Two Arrays Simultaneously In Ruby
// Iterate two arrays simultaneously in Ruby
array1.zip(array2).each do |v1, v2| # iterates over array1 and array2 end





