Challenge: MVVM Pattern

In this challenge, you have to implement the MVVM pattern to solve the given problem.

Problem statement

In this challenge, you need to use the MVVM pattern to change the color of the “color” you write in the input field.

In the Model, you need to define the following functions:

  • subscribe: Registers an observer

  • notifyObservers: Notifies the observer of a change

  • getCurrentColor: Returns ...