Count operator

The count operator is pretty descriptive; it emits the only value with the number of elements in the input stream. However, the count emits at the moment when the original stream completes, so, in the case of an endless stream, the count will not ever finish or return anything, as shown in the following diagram:

Diagram 2.9 Count operator: counts the number of items emitted by the Observable source  and emit only this value

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.93.175