// RxJS v6+import { from } from'rxjs';import { first } from'rxjs/operators';constsource=from([1,2,3,4,5]);//조건을 만족하는 첫번째 값을 발생시킵니다constexample=source.pipe(first(num => num ===5));//결과: "First to pass test: 5"constsubscribe=example.subscribe(val =>console.log(`First to pass test: ${val}`));