Complete the code to import the tap operator from RxJS.
import { [1] } from 'rxjs/operators';
The tap operator is imported from rxjs/operators to perform side effects without altering the stream.
Complete the code to add a tap operator that logs the emitted value.
observable.pipe([1](value => console.log(value)))The tap operator is used here to log each emitted value for side effects.
Fix the error in the tap usage to correctly perform a side effect.
observable.pipe(tap([1]))The tap operator expects a function. Passing value => console.log(value) correctly logs each value.
Fill both blanks to create a tap operator that logs 'Start' before and 'End' after the observable emits.
observable.pipe(tap([1], [2]))
The first function runs on each emission (logging 'Start'), the second runs on completion (logging 'End').
Fill all three blanks to create a tap operator that logs the value, errors, and completion messages.
observable.pipe(tap([1], [2], [3]))
The tap operator can take three functions: for next values, errors, and completion respectively.