> For the complete documentation index, see [llms.txt](https://soufatn.gitbook.io/rxjs-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://soufatn.gitbook.io/rxjs-book/summary/observable/observable_instance_methods/concat.md).

# concat

Concatenates all the observable sequences. This takes in either an array or variable arguments to concatenate.

## Arguments

1. `args` *(`arguments` | `Array`)*: An array or arguments of Observable sequences.

## Returns

*(`Observable`)*: An observable sequence that contains the elements of each given sequence, in sequential order.

## Example

```javascript
/* Using Promises and Observable sequences */
var source1 = Rx.Observable.return(42);
var source2 = RSVP.Promise.resolve(56);

var source = Rx.Observable.concat(source1, source2);

var subscription = source.subscribe(
    function (x) {
        console.log('Next: ' + x);
    },
    function (err) {
        console.log('Error: ' + err);
    },
    function () {
        console.log('Completed');
    });

// => Next: 42
// => Next: 56
// => Completed
```
