Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'use strict';
- console.clear();
- var source = [0, 1, 2, 3, 4, 5];
- source.filter(function (x) {
- return x % 2 === 1;
- }).map(function (x) {
- return x + '!';
- }).forEach(function (x) {
- return console.log(x);
- });
- //console.clear();
- console.log("observable");
- var source1 = Rx.Observable.fromArray([0, 1, 2, 3, 4, 5]);
- source1.filter(x => x % 2 === 0 )
- .map(x => x +'!')
- .forEach(x => console.log(x));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement