const rx = require("rxjs") rx.Observable.of(1, 2).switchMap((v) => { if (v === 1) return rx.Observable.of(v).delay(400) if (v === 2) return rx.Observable.of(v).delay(200) }).subscribe(a => console.log(a));

no comments

    sign in to comment

    running