Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/5.4.0/Rx.js"></script>
 
// 3秒後に`1`を通知する Observable
const observable = Rx.Observable.of(1).delay(3000);
observable.subscribe(
  x => console.log(`next: ${x}`),
  error => console.error(`error: ${error}`),
  () => console.log('complete')
);
// 3秒後に以下がコンソール出力される
// => "next: 1"
// => "complete"
Output

This bin was created anonymously and its free preview time has expired (learn why). — Get a free unrestricted account

Dismiss x
public
Bin info
anonymouspro
0viewers