LiveLoveApp logo

Exercise - Observables

Exercise

Ok, let's dive into the code ourselves. The goal of this exercise is to become familiar with using Observables.

  1. Open the exercise on codesandbox.
  2. I've already imported the fromEvent function for you.
  3. Use the fromEvent() function to create a new Observable that attaches a click event listener to the document.
  4. Use the subscribe() method to invoke the Observable.
  5. Use console.log() to log a message when a value is produced.