[Rx.Observable.prototype.subscribe([observer] | [onNext], [onError], [onCompleted]),

Rx.Observable.prototype.forEach([observer] | [onNext], [onError], [onCompleted])](https://github.com/Reactive-Extensions/RxJS/blob/master/src/core/observable.js)

Prepends a sequence of values to an observable sequence with an optional scheduler and an argument list of values to prepend.

Arguments

  1. [observer] (Observer): The object that is to receive notifications.
  2. [onNext] (Function): Function to invoke for each element in the observable sequence.
  3. [onError] (Function): Function to invoke upon exceptional termination of the observable sequence.
  4. [onCompleted] (Function): Function to invoke upon graceful termination of the observable sequence.

Returns

(Disposable): The source sequence whose subscriptions and unsubscriptions happen on the specified scheduler.

Example

With no arguments

With an observer

Using functions