Hard
The example below shows us what practice under RxJS?
const request = interval(1000);
function takeOnlyPairAndSum(
max: number
): UnaryFunction<Observable<number>, Observable<number>> {
return pipe(
filter((val) => val % 2 == 0),
reduce((acc, value) => acc + value),
tap(x => console.log(x)),
);
}
request.pipe(takeOnlyPairAndSum(10)).subscribe();
Author: Amine BouchamStatus: PublishedQuestion passed 17 times
Edit
0
Community EvaluationsNo one has reviewed this question yet, be the first!
Similar QuestionsMore questions about RxJS
0
How to listen to an input field in order to offer auto-completion to my user in RxJS0
Explain the difference between a ReplaySubject and a BehaviorSubject in RxJS0
Combine a large number of requests in RxJS0
How to turn a cold observable into a hot observable in RxJS0
What are the major changes between RxJS 5 and RxJS 6?