Loop the Loop with Loop - Print Ruby error


#1



https://www.codecademy.com/en/courses/ruby-beginner-en-XYcN1/3/4?curriculum_id=5059f8619189a5000201fbcb#


My code prints Ruby! 30 times but it gives me the error "Oops, try again. It looks like you didn't print out the string 'Ruby!' 30 times."


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


#2

Never mind found a post on this already. --> https://discuss.codecademy.com/t/17-loop-the-loop-with-loop/43033/8


#3

ruby =0
loop do
ruby +=1
print "Ruby!"
break if ruby ==30
end


#4

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