Last active
April 27, 2018 19:11
-
-
Save darkyelox/c4dee046605e07ad043225f38ad71105 to your computer and use it in GitHub Desktop.
Example of RxJS
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
| Rx.Observable.of(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12) // defines a stream of numbers | |
| .map(num => num * 2) // multiply each number by two | |
| .subscribe(num => console.log(num)) // subscribes and prints each number |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment