Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // import RxJs
- var Rx = require(‘rxjs/Rx’);
- // define array literal
- const V4 = [1, 2, 3];
- // transform array into Observable
- const MyObservable = Rx.Observable.from(V4);
- // ”subscribe” (i.e. iterate over the content
- // of the Observable)
- MyObservable.subscribe(x => console.log(x));
Add Comment
Please, Sign In to add comment