What does the `scan` operator do in RxJS?
-
A
Filters values based on a cumulative condition
-
B
Accumulates values over time like Array.reduce and emits each intermediate result
-
C
Groups emissions into fixed-size arrays
-
D
Samples the stream at a regular interval