Skip to main content
Skip table of contents

break

기능

반복문 내부 블록을 빠져나올 때 사용합니다.

예제

PY
x =0
while True:
x = x + 1
if x > 10:
break

sum = 0;cnt = 0
while True:
if cnt > 9:
break
sum = sum + cnt
cnt = cnt+1
tp_log("sum = " + str(sum))
#expected print result:
#sum = 45

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.