import { range } from 'rxjs'; range(1, 5).subscribe(num => { console.log(num); // will log: 1, 2, 3, 4, 5 });
import { range } from 'rxjs'; range(10, 0, -2).subscribe(num => { console.log(num); // will log: 10, 8, 6, 4, 2 });In this example, we use the `range` function to create an observable that emits a range of numbers from 10 to 0 with a step of -2. Overall, the typescript rxjs.rx Observable range is a handy package library for creating observables that emit a range of sequential numbers.