Which happens overtime, every 400ms it return an Interge if possible. So the main difference between array stay in memory and the events streams is array already stay in memory and the streams happens overtime. But the nice things about the stream is we can still use the methods we have...
switchMap: Projects each source value to an Observable, cancels the previous inner observable, and emits values only from the most recent inner observable. Handling Errors You can use the 'catchError' operator to gracefully handle errors in observables. import { of, throwError } from 'rxjs'; ...