LiveLoveApp logo

Exercise - New Observable

Exercise

The goal of this exercise is to become familiar with creating a new Observable.

  1. Open the exercise on codesandbox.
  2. I've already imported the Observable class for you.
  3. New up the Observable class.
  4. Provide the constructor() function with a callback function that will be invoked by RxJS with a Subsciber instance.
  5. Use the next() method to emit a value to all Observers (subscribers) of the Observable.
  6. Finally, use the subscribe() method on the new Observable instance to subscribe to the next notification.
  7. Log out the value that is emitted.