title: Difference between the methods .pipe() and .subscribe() on a RXJS observable
body: <p>I recently notice that I can return a value inside <code>.pipe()</code> but not inside <code>.subscribe()</code>.</p>
  
  <p>What is the difference between these two methods? </p>
  
  <p>For example if I have this function, let's call it 'deposit', which is supposed to return the account balance, if I do this:</p>
  
  <pre><code>deposit(account, amount){
      return this.http.get('url')
      .subscribe(res =&gt; {
          return res;
      }
  }
  </code></pre>
  
  <p>It returns an observable and if I do this:</p>
  
  <pre><code>deposit(account, amount){
      return this.http.get('url')
      .pipe(
          map(res =&gt; {
              return res;
          });
      );
  }
  </code></pre>
  
  <p>It returns the account balance as expected.</p>
  
  <p>So why?</p>