break
和 continue
如果你想立即進入下一次迭代,可以使用 continue
。
If you want to exit any kind of loop early, use break
. For loop
, this can take an optional expression that becomes the value of the loop
expression.
break
和 continue
如果你想立即進入下一次迭代,可以使用 continue
。
If you want to exit any kind of loop early, use break
. For loop
, this can take an optional expression that becomes the value of the loop
expression.