Both are used to join multiple streams.
From this I am confused between both, I read combineLatest make calls in sync mode and forkJoin calls parallel,
I am trying this
combineLatest([
of(null).pipe(delay(5000)),
of(null).pipe(delay(5000)),
of(null).pipe(delay(5000))
]).subscribe(() => console.log(new Date().getTime() - start));
forkJoin([
of(null).pipe(delay(5000)),
of(null).pipe(delay(5000)),
of(null).pipe(delay(5000))
]).subscribe(() => console.log(new Date().getTime() - start));
that prints
5004
5014
every time result is arround 5 sec, if combineLatest sends request in sequence then why it is printing duration arround 5 sec.
Is this correct or there is any other difference, any example code?