Complete the code to import the map operator from RxJS.
import { [1] } from 'rxjs/operators';
The map operator is used to transform data streams in Angular with RxJS.
Complete the code to transform the emitted values by doubling them.
source$.pipe([1](value => value * 2))
filter which only filters values.tap which is for side effects, not transformation.The map operator applies a function to each emitted value, transforming the stream.
Fix the error in the code by choosing the correct operator to transform the stream.
const doubled$ = source$.pipe([1](value => value * 2));
subscribe instead of map.pipe as an operator.The map operator transforms each value. Using subscribe or pipe incorrectly here causes errors.
Fill both blanks to create a stream that filters even numbers and then doubles them.
source$.pipe([1](value => value % 2 === 0), [2](value => value * 2))
tap instead of map for transformation.First, filter selects even numbers. Then, map doubles them.
Fill all three blanks to create a stream that filters odd numbers, doubles them, and logs each value.
source$.pipe([1](value => value % 2 !== 0), [2](value => value * 2), [3](value => console.log(value)))
map instead of tap for logging.filter selects odd numbers, map doubles them, and tap logs each value without changing the stream.