Observables are sequence of values emitted in a lazy way.
Comparing them to other JavaScript solutions, they are the missing spot in the following table.
Single | Multiple | |
---|---|---|
Pull | Function | Iterator |
Push | Promise | Observable |
An Observable is to an Iterator as a Promise is to a Function.
Observables are not naturally async, though they are widely used to build asynchronous code.
They can be thought as an async version of a collection, but this is a misconception. They are just a push version of an iterator.
Read Pull versus Push to know more.