Created
May 14, 2016 07:19
-
-
Save ahgood/bd522bacea86a23d0f2dd0cb6514586c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.js"></script> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width"> | |
| <title>JS Bin</title> | |
| </head> | |
| <body> | |
| <script id="jsbin-javascript"> | |
| "use strict"; | |
| console.clear(); | |
| var streamA = Rx.Observable.of(3, 4, 1); | |
| console.log(JSON.stringify(streamA.array.map(function (b) { | |
| return b + 1; | |
| }))); | |
| var streamB = streamA.map(function (a) { | |
| return 10 * a; | |
| }); | |
| streamB.subscribe(function (a) { | |
| return console.log(a); | |
| }); | |
| </script> | |
| <script id="jsbin-source-javascript" type="text/javascript">console.clear() | |
| var streamA = Rx.Observable.of(3, 4, 1) | |
| console.log(JSON.stringify(streamA.array.map(b => b + 1))) | |
| var streamB = streamA.map(a => 10 * a) | |
| streamB.subscribe(a => console.log(a))</script></body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment