0
Q:

rails loop

for i in 0..2 do 
  print(i)
end

# => 0
# => 1
# => 2
4
for element in array do
  element.do_stuff
end
1
while $i < $num  do
   puts("Inside the loop i = #$i" )
   $i +=1
end
-1

New to Communities?

Join the community