Gugu
0
Q:

ruby while

for element in array do
  element.do_stuff
end
1
a = ["One", "Two", "Three", "Four"];
b = 0
while b<a.length do
  puts a[b]
  b+=1
end
-1
while $i < $num  do
   puts("Inside the loop i = #$i" )
   $i +=1
end
-1

New to Communities?

Join the community