Ruby - Loops and Iteration
What will this Ruby code print?
sum = 0
5.downto(3) { |i| sum += i }
puts sumsum = 0
5.downto(3) { |i| sum += i }
puts sum15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions