Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
untitled notebook
node v6.17.1
version:
master
endpoint
share
tweet
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));
Loading…
no comments
sign in
to comment