Wzorzec opisuje obiekt (nazywany Subject lub Observable), który informuje inne obiekty o zmianie swojego stanu, dzięki czemu subskrybenci mogą zareagować na wszelkie zmiany.
Wyobraźmy sobie, że mamy portal z ogłoszeniami o pracę:
function JobPortal() {
    this.observers = [];
    this.subscribe = function(observer) {
        this.observers.push(observer);
    }
    this.unsubscribe = function(observer) {
        var index = this.observers.findIndex(
        el => el === observer);
        this.observers.splice(index, 1);
    }
    this.addNewOffer = function(offer) {
        this.observers.forEach(
        el => el.notify(offer));
    }
}
Kod potencjalnego kandydata:
function Candidate(name){
    this.name = name;
    this.notify = function (offer){
        console.log(this.name+" ma ofertę:"+offer);
    }
}Połączenie kandydatów z portalem:
let jobPortal = new JobPortal(); 
jobPortal.subscribe(new Candidate("Ola")); 
jobPortal.subscribe(new Candidate("Adam"));
let user3 = new Candidate("Ania");
jobPortal.subscribe(user3);
jobPortal.unsubscribe(user3);
jobPortal.addNewOffer("FrontEnd dev oferta");
// Ola ma ofertę: FrontEnd dev oferta
// Adam ma ofertę: FrontEnd dev oferta
KW
