Angular · RxJS · Junior · Comparison
What is the difference between switchMap, mergeMap, concatMap, and exhaustMap?
Short Interview Answer
They flatten inner Observables differently: switch cancels, merge concurrent, concat queues, exhaust ignores new until done.
Detailed Explanation
Use switchMap for typeahead/HTTP that should cancel. concatMap for ordered writes. mergeMap for independent parallel work. exhaustMap for ignoring double-submits.