How do I do this type of for loop in Ruby?
for(int i=0; i
['foo', 'bar', 'baz'].each_with_index {|j, i| puts "#{i} #{j}"}