The map and filter Operators
Explain how map and filter transform and select emitted values without mutating the source Observable.
map and filter are usually the first two RxJS operators anyone learns, precisely because they mirror the exact same array methods with the exact same names and semantics — map transforms each emitted value into something else, and filter selectively lets some values through based on a predicate, discarding the rest. Interviewers ask about these first because they establish the foundational operator mental model (pure, composable transformations piped together) before moving into the more complex flattening operators.
map is like a translator converting every sentence spoken in one room to another language before it reaches your ears; filter is like a bouncer at a door only letting through guests who match a specific criterion, turning everyone else away before they even reach the room.