Next! Code is correct but it still returns me an error


#1



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


It prints everything correctly but it doesn't let me pass. =/


i = 20
loop do
  i -= 1
  next if i % 2 != 0
  print "#{i} "
  break if i <= 0
end


#2

Ah never mind. It was because the space I added after #{ i } for better readability. Solved.


#4

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