> For the complete documentation index, see [llms.txt](https://hgy5710.gitbook.io/javascript-jquery/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hgy5710.gitbook.io/javascript-jquery/undefined-1/continue.md).

# continue문

continue문은 반복문에서만 사용할 수 있습니다. while문에서 사용할 경우 continue문 다음에 오는 코드는 무시하고 바로 조건식으로 이동해 조건 검사를 합니다. for문에서 continue문을 실행할 경우에는 continue문 다음에 오는 코드는 무시하고 바로 증감식으로 이동하여 증감 연산을 실행합니다.

#### continue문

> for(초깃값; 조건식; 증감식){\
> &#x20;   continue문;\
> &#x20;   실행코드;\
> }

> let 변수 = 초깃값;\
> while(조건식){\
> &#x20;    증감식;\
> &#x20;    continue문;\
> &#x20;   실행코드;\
> }

```javascript
//for문
for(let i=1; i<=10; i++){
    if(i == 6){
        continue;
    }         
    document.write(i,"<br>");  
}
```

```javascript
//while문
let num=0;
while(num<=10){
    num++;
    if(num == 6){
        continue;
    }
    
    document.write(num,"<br>");
}
```
