Demo:  tap

The tap operator just reads and emits the incoming data without making any changes to it.

We may use it for many purpose like displaying,logging, monitoring, persisting etc.

let input=timer(500,1500).pipe(take(4));

//Tap lets the data pass through without any changes
let process=tap((v:number) => v+100);

//The output from tap is the same as it's input
let output=input.pipe(process).subscribe(v=>console.log(v))