// RxJS v6+
import { of } from 'rxjs';
//제공된 수를 순서대로 내보냅니다.
const source = of(1, 2, 3, 4, 5);
//결과: 1,2,3,4,5
const subscribe = source.subscribe(val => console.log(val));
// RxJS v6+
import { of } from 'rxjs';
//어떠한 타입의 값이든 내보냅니다.
const source = of({ name: 'Brian' }, [1, 2, 3], function hello() {
return 'Hello';
});
//결과: {name: 'Brian'}, [1,2,3], function hello() { return 'Hello' }
const subscribe = source.subscribe(val => console.log(val));