> For the complete documentation index, see [llms.txt](https://junwoo45.gitbook.io/learn-rxjs-korean/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://junwoo45.gitbook.io/learn-rxjs-korean/learn-rxjs/recipes-1/utility/repeat.md).

# repeat

#### signature: `repeat(count: number): Observable`

## 완료 시 옵저버블을 반복합니다.

:bulb: [`retry`](/learn-rxjs-korean/learn-rxjs/recipes-1/error_handling/retry.md)와 같지만, 에러가 없는 경우에만 반복합니다!

### 예시

**예시 1: 3번 반복합니다**

( [StackBlitz](https://stackblitz.com/edit/rxjs-repeat-learnrxjs?file=index.ts\&devtoolsheight=100) )

```javascript
// RxJS v6+
import { repeat, delay } from 'rxjs/operators';
import { of } from 'rxjs';

const delayedThing = of('delayed value').pipe(delay(2000));

delayedThing
  .pipe(repeat(3))
  // delayed value.. delayed value.. delayed value..
  .subscribe(console.log);
```

### 관련된 사용법

* [Click Ninja Game](/learn-rxjs-korean/learn-rxjs/recipes/click-ninja-game.md)
* [Lockscreen](/learn-rxjs-korean/learn-rxjs/recipes/lockscreen.md)
* [Space Invaders Game](/learn-rxjs-korean/learn-rxjs/recipes/space-invaders-game.md)
* [Swipe To Refresh](/learn-rxjs-korean/learn-rxjs/recipes/swipe-to-refresh.md)

### 추가 자료

* [repeat](https://rxjs.dev/api/operators/repeat):newspaper: - 공식 문서

> :open\_file\_folder: Source Code: <https://github.com/ReactiveX/rxjs/blob/master/src/internal/operators/repeat.ts>
