1 min read 55 words Updated Sep 24, 2026 Created Sep 24, 2026
#JavaScript#RxJS#angular

This operator creates an Observable from a some data.

const numbers$ = of([1, 2, 3])

vs. from

  • from() will run for every piece of data
  • of() will only run a single time.
numbers$.subscribe((value) => {
  console.log(value);
});

3 logs for "from" and only 1 log when using of()