Loop the Loop with Loop category:116


#1

The below out come is 30 Ruby , so why is there an error!?
`counter = 1

loop do
counter += 1
print "Ruby"
break if counter > 30
end`


#2

I think this is one of those unfortunate cases where there is a "!" at the end of the string, which is quite easy to miss.

If you change the line

print "Ruby"

to

print "Ruby!"

you should be able to move on.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.