Skip to content

Instantly share code, notes, and snippets.

@Mayankgupta688
Created April 24, 2019 06:57
Show Gist options
  • Save Mayankgupta688/7574a2f3015f4720d140979db5ed03fe to your computer and use it in GitHub Desktop.
Save Mayankgupta688/7574a2f3015f4720d140979db5ed03fe to your computer and use it in GitHub Desktop.
import { Observable } from 'rxjs';
var randomNumberGenerator = Observable.create(function(observer) {
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
observer.next(Math.floor(Math.random() * 100));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment