Rubyists use the
.each
or .map
way of looping frequently. However, when there is a need of a while
loop, the following is the correct way.loop do
# statements
break if condition
end
No comments:
Post a Comment