- RxJS Tutorial
- RxJS - Home
- RxJS - Overview
- RxJS - Environment Setup
- RxJS - Latest Updates
- RxJS - Observables
- RxJS - Operators
- RxJS - Working with Subscription
- RxJS - Working with Subjects
- RxJS - Working with Scheduler
- RxJS - Working with RxJS & Angular
- RxJS - Working with RxJS & ReactJS
- RxJS Useful Resources
- RxJS - Quick Guide
- RxJS - Useful Resources
- RxJS - Discussion
RxJS - Creation Operator range
This operator will create an Observable that will give you a sequence of numbers based on the range provided.
Syntax
range(start: number, count: number): Observable
Parameters
start − The first value will be from start and will emit sequentially until the count given.
count − the count of numbers to be emitted.
Return value
It returns an Observable that will give you a sequence of numbers based on the range provided.
Example
import { range } from 'rxjs'; let ints = range(1, 10); ints.subscribe(x => console.log(x));
Output
Advertisements
To Continue Learning Please Login
Login with Google