直到
当满足给定条件时,while
循环执行块:
i = 0
while i < 5
puts "Iteration ##{i}"
i +=1
end
当条件为假时,until
循环执行块:
i = 0
until i == 5
puts "Iteration ##{i}"
i +=1
end
当满足给定条件时,while
循环执行块:
i = 0
while i < 5
puts "Iteration ##{i}"
i +=1
end
当条件为假时,until
循环执行块:
i = 0
until i == 5
puts "Iteration ##{i}"
i +=1
end