Will RxJS forkJoin return results in order?

Anti-answer

For this of us who actually want to get results sorted by task finish time you can use following alternative to forkJoin

const { merge, of } = rxjs;
const { bufferCount, take, delay } = rxjs.operators;

let t1 = of(1).pipe(delay(1000));
let t2 = of(2).pipe(delay(3000));
let t3 = of(3).pipe(delay(4000));
let t4 = of(4).pipe(delay(2000));

// in forkJoin(t1,t2,t3,t4) we get:      [1,2,3,4]
// in this we get sorted by finish time: [1,4,2,3]
// bufferCount(4) join 4 results to array
// take(1) take on buffer and unsubscribe after

merge(t1,t2,t3,t4)
  .pipe(bufferCount(4), take(1))      
  .subscribe(console.log)
<script src="https://cdnjs.cloudflare.com/ajax/libs/rxjs/6.5.5/rxjs.umd.min.js" integrity="sha256-85uCh8dPb35sH3WK435rtYUKALbcvEQFC65eg+raeuc=" crossorigin="anonymous"></script>

It will return results in the same order. As is described in these official docs.

Good to mention that it will emit only latest values of the streams:

var source = Rx.Observable.forkJoin(
  Rx.Observable.of(1,2,3),
  Rx.Observable.of(4)
);

source.subscribe(x => console.log("Result", x));

// LOG: Result [3,4]