Last active
November 25, 2017 02:22
-
-
Save mbejda/b83c0764ebaa4eaf58ae00f066965598 to your computer and use it in GitHub Desktop.
SwitchMap
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
var source = Observable.create(observer => { | |
let valueA = 5; | |
let valueB = 10; | |
observer.next(valueA); | |
observer.next(valueB); | |
observer.complete(); | |
}) | |
source.subscribe((val)=>{ | |
console.log(val); /// 10 (valueB) | |
}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment