JavaScript Concat Array of Observables and have a single subscription output concat observable array,merge array observable,rxjs concat array of

I have several cases on my software where I have an array of observables and I need to execute them in order. Having the next subscription to happen only after the previous is complete.

So Im using the concat operator. It works great, however its subscription gets triggered every time one of the Observables gets completed, and I need to have it be triggered only after everything is complete.

concat(
  of(1, 2, 3).pipe(delay(3000)),
  // after 3s, the first observable will complete and subsquent observable subscribed with values emitted
  of(4, 5, 6).pipe(delay(3000)),
)
  // log: 1,2,3,4,5,6
  .subscribe((v) => {
  // Needs to be triggered once after everything is complete
    console.log(v);
  });

I need a way to pipe this observable so the subscription gets triggered only once after everything is complete, the value of the subscription is not important in this case, so it can be omitted.

If possible the values could be made available in a form of an array inside the subscription context.

Answer:1

I've made a game with JavaScript where a player can only guess a random number from 1 to 10 three times, each time the program reads a wrong answer it displays what should've been the right answer, ...

I've made a game with JavaScript where a player can only guess a random number from 1 to 10 three times, each time the program reads a wrong answer it displays what should've been the right answer, ...

  1. phd program right after undergraduate
  2. mba program right after undergrad
  3. nurse practitioner program right after bsn

In my site I have a switch between a down arrow & and an up arrow. See here How do I change this to a CSS transition, so there's a brief break between the switch? Here's my code: function ...

In my site I have a switch between a down arrow & and an up arrow. See here How do I change this to a CSS transition, so there's a brief break between the switch? Here's my code: function ...

When hitting https://login.salesforce.com/services/oauth2/token, using Postman. POST https://login.salesforce.com/services/oauth2/token Response: I receive a token, but when I try to do something ...

When hitting https://login.salesforce.com/services/oauth2/token, using Postman. POST https://login.salesforce.com/services/oauth2/token Response: I receive a token, but when I try to do something ...

I'm using DateFNS and I need to generate a countdown with it. distanceInWordsToNow only outputs in about 3 years but I need the exact time like 3 Years, 11 Months, 20 Days, 3 Hours, 2 Minutes. How to ...

I'm using DateFNS and I need to generate a countdown with it. distanceInWordsToNow only outputs in about 3 years but I need the exact time like 3 Years, 11 Months, 20 Days, 3 Hours, 2 Minutes. How to ...

  1. countdown with date
  2. countdown date and time
  3. countdown date in excel
  4. countdown date and time timer
  5. countdown date on iphone
  6. countdown date for desktop
  7. countdown date in javascript
  8. countdown date in powerpoint
  9. countdown date in php
  10. countdown date in android
  11. countdown to date with picture
  12. countdown to date with months
  13. countdown to date app
  14. countdown to date calculator
  15. countdown to date timer
  16. countdown to date online
  17. countdown to date clock
  18. countdown to date widget
  19. countdown to date without weekends
  20. countdown to date html