How do I do this type of for loop in Ruby?
for(int i=0; i
What? From 2010 and nobody mentioned Ruby has a fine for /in loop (it's just nobody uses it):
ar = [1,2,3,4,5,6] for item in ar puts item end