Задача

Что выведет код в консоль?

const a = new Subject();
const b = new Subject();
 
concatMap([a, b]).subscribe((v) => console.log("concatMap", v));
 
merge(a, b).subscribe((v) => console.log("merge", v));
 
a.pipe(switchMap(() => b)).subscribe((v) => console.log("switchMap", v));
 
a.next(1);
b.next(1);
a.next(2);
a.next(3);
b.next(2);

Решение