// RxJS v6+import { mapTo } from'rxjs/operators';import { interval } from'rxjs/observable/interval';import { race } from'rxjs/observable/race';//take the first observable to emitconstexample=race(//emit every 1.5sinterval(1500),//emit every 1sinterval(1000).pipe(mapTo('1s won!')),//emit every 2sinterval(2000),//emit every 2.5sinterval(2500));//output: "1s won!"..."1s won!"...etcconstsubscribe=example.subscribe(val =>console.log(val));