- RxJS Tutorial
- RxJS - Home
- RxJS - Overview
- RxJS - Environment Setup
- RxJS - Latest Updates
- RxJS - Observables
- RxJS - Operators
- RxJS - Working with Subscription
- RxJS - Working with Subjects
- RxJS - Working with Scheduler
- RxJS - Working with RxJS & Angular
- RxJS - Working with RxJS & ReactJS
- RxJS Useful Resources
- RxJS - Quick Guide
- RxJS - Useful Resources
- RxJS - Discussion
RxJS - Join Operator race
It will give back an observable that will be a mirror copy of the first source observable.
Syntax
race(observables: array[]): Observable
Parameters
observable − The argument for this operator is an array of Observable.
Return value
It will return an observable that will be a mirror copy of the first source observable.
Example
import { of, race } from 'rxjs'; import { concat } from 'rxjs/operators'; let list1 = of(2, 3, 4, 5, 6); let list2 = of(4, 9, 16, 25, 36) let final_val = race(list1, list2); final_val.subscribe(x => console.log(x));
Output
Advertisements