do while문
while 문의 경우에는 조건식의 만족 여부를 먼저 검사한 후 중괄호에 있는 코드의 실행 여부를 결정했습니다. do while 문은 반드시 한 번은 코드를 실행하고 조건식을 검사합니다.
Last updated
Was this helpful?
while 문의 경우에는 조건식의 만족 여부를 먼저 검사한 후 중괄호에 있는 코드의 실행 여부를 결정했습니다. do while 문은 반드시 한 번은 코드를 실행하고 조건식을 검사합니다.
Last updated
Was this helpful?
Was this helpful?
let num2 = 0;
do{
num2++;
document.write(num2 + ". 실행되었습니다.<br>");
} while(num2 < 20)