We can create our own Observable by creating a Function that takes an observer parameter. The function will be passed to create the Observable. When someone subscribes to the observable, the function is called and returns the values emitted from the function.
In the below sample we create a function listGenerator, which takes an observer as a parameter and emit list values one at a time using .next().
In the below sample we create a function listGenerator, which takes an observer as a parameter and emit list values one at a time using .next().