( StackBlitz | jsBin | jsFiddle )
// RxJS v6+
import { interval } from 'rxjs';
//emit value in sequence every 1 second
const source = interval(1000);
//output: 0,1,2,3,4,5....
const subscribe = source.subscribe(val => console.log(val));
- Alphabet Invasion Game
- Battleship Game
- Breakout Game
- Car Racing Game
- Catch The Dot Game
- Flappy Bird Game
- Matrix Digital Rain
- Memory Game
- Platform Jumper Game
- Space Invaders Game
- Stop Watch
- Tank Battle Game
- Tetris Game
- Uncover Image Game
- interval 📰 - Official docs
- Creation operators: interval and timer 🎥 💵 - André Staltz
- Build your own interval operator 🎥 - Kwinten Pisman
📁 Source Code: https://github.com/ReactiveX/rxjs/blob/master/src/internal/observable/interval.ts