code: function () {
          var i, len;
          checkDisposed(this);
          if (!this.isStopped) {
            this.isStopped = true;
            var os = cloneArray(this.observers), len = os.length;
  
            if (this.hasValue) {
              for (i = 0; i < len; i++) {
                var o = os[i];
                o.onNext(this.value);
                o.onCompleted();
              }
            } else {
              for (i = 0; i < len; i++) {
                os[i].onCompleted();
              }
            }
  
            this.observers.length = 0;
          }
        }
docs: Notifies all subscribed observers about the end of the sequence, also causing the last received value to be sent out (if any).