title: Add if and else condition in subscribe in Angular
body: <p>is there any way to apply if condition in subscribe function?</p>
  
  <pre><code>this.Subscription1 = interval(1000).subscribe(x =&gt;
    this.seconds -= 1
  );
  </code></pre>
  
  <p>such that:</p>
  
  <pre><code>this.Subscription1 = interval(1000).subscribe(x =&gt;
  if(this.seconds!=0){
        this.seconds -= 1
  });
  </code></pre>