Tag web development

Observer Design Pattern in JavaScript

The Observer Pattern is about a “one-to-many” relationship from one object called Subject (or publisher) to one or more objects called Listeners (or observers) that get notified when the Subject changes state. Therefore, several listeners could depend on one object to change for them to perform any action.