index = 1
while index < 10 do
index = index + 1
end
repeat
index = index + 1
until index >= 20
return index
1.while需要和do一起使用,也是需要end结尾
2.repeat需要和until一起使用,不需要end结尾
3.repeat至少会运行一次,不管index >= 20 ,还是其他值,repeat都会运行一次