Complete the code to import the map operator from RxJS.
import { [1] } from 'rxjs/operators';
The map operator is imported from rxjs/operators to transform emitted values.
Complete the code to transform each emitted number by doubling it using map.
numbers$.pipe([1](x => x * 2)).subscribe(console.log);
The map operator applies a function to each emitted value, here doubling each number.
Fix the error in the code to correctly transform emitted strings to uppercase using map.
source$.pipe([1](str => str.toUpperCase())).subscribe(console.log);The map operator transforms each emitted string to uppercase.
Fill both blanks to create a map operator that adds 10 to each emitted number and then filters out numbers less than 20.
source$.pipe([1](x => x + 10), [2](x => x >= 20)).subscribe(console.log);
First, map adds 10 to each number. Then, filter removes numbers less than 20.
Fill all three blanks to create a map operator that converts strings to lowercase, trims whitespace, and then filters out empty strings.
source$.pipe([1](str => str.toLowerCase()), [2](str => str.trim()), [3](str => str !== '')).subscribe(console.log);
The first two map operators transform the strings to lowercase and trim whitespace. The filter removes empty strings.