Observable combine latest

Example of Observable.timer and of the combineLatest operator

by Mario_Rivis

HTML

<script src="https://unpkg.com/@reactivex/[email protected]/dist/global/Rx.js"></script>

JavaScript

const timer1$ = Rx.Observable.timer(1000, 3000);
const timer2$ = Rx.Observable.timer(2000, 3000);
const timer3$ = Rx.Observable.timer(3000, 3000);


Rx.Observable.combineLatest(timer1$, timer2$, timer3$)
  .subscribe(values => console.log(values));