Information that is ordered in time
Emit values, errors, or completion
Immutable
const Rx = require('rxjs/Rx')
const source = Rx.Observable.interval(1000);
const subscription1 = source.subscribe(
x => console.log('Observer 2: onNext: ' + x),
e => console.log('Observer 1: onError: ' + e.message),
() => console.log('Observer 1: onCompleted'));
const subscription2 = source.subscribe(
x => console.log('Observer 2: onNext: ' + x),
e => console.log('Observer 2: onError: ' + e.message),
() => console.log('Observer 2: onCompleted'));
setTimeout(() => {
subscription2.unsubscribe();
subscription1.unsubscribe();
}, 5000);