ruby入门_until

until

直到...

i = 5

# == while not
until i == 0
  puts i
  i=i-1
end

输出

5
4
3
2
1

你可能感兴趣的:(Ruby)