Answers for "ruby way loops"

9

ruby each do method

array.each do |item|
  puts "The current array item is: #{item}"
end
Posted by: Guest on March-09-2020
-1

rails loop

while $i < $num  do
   puts("Inside the loop i = #$i" )
   $i +=1
end
Posted by: Guest on April-06-2020

Browse Popular Code Answers by Language