Someone, please explain the difference between SwitchMap and FlatMap in terms of Javascript ( in angular perspective, rxjs 5)
In my understanding.
S
This is at the beginning a bit long to grasp, at least for me.
Anyways, consider this:
flatMap IS ANOTHER NAME FOR mergeMap - mergeMap method accepts an optional parameter concurrency, which defines how many Observables can be subscribed at the same time
concatMap equals mergeMap with concurrency set to 1
with mergeMap you do not lose any event emitted by the Observables you are merging as you suggested in your answer
switchMap works as you have described (see this nice article for more details https://blog.angular-university.io/rxjs-switchmap-operator/)