Observables provide support for passing messages between publishers and subscribers in your application.
Observables offer significant benefits over other techniques for event handling, asynchronous programming, and handling multiple values.
The subscribe() call returns a Subscription object that has an unsubscribe() method, which you call to stop receiving notifications.
Three types of notifications that an observable can send:
next Required. A handler for each delivered value. Called zero or more times after execution starts.
error Optional. A handler for an error notification. An error halts execution of the observable instance.
complete Optional. A handler for the execution-complete notification. Delayed values can continue to be delivered to the next handler after execution is complete.
let s = new Subject();