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>
 
Rx.Observable.of(1, 2, 3, 4, 5)
  .filter(v => v % 2 === 0)
  .map(v => v * 10)
  .subscribe({
    next: x => console.log(x),
    error: error => console.error(error),
    complete: () => console.log('complete')
  });
  // => 20
  // => 40
  // => "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