Intermediate Web & Software Development
Q55 / 100

What is the observer pattern?

Correct! Well done.

Incorrect.

The correct answer is B) A behavioral pattern where objects (observers) subscribe to notifications from a subject, which notifies all registered observers when its state changes

B

Correct Answer

A behavioral pattern where objects (observers) subscribe to notifications from a subject, which notifies all registered observers when its state changes

Explanation

Observer pattern (publish-subscribe): EventEmitter in Node.js, addEventListener in DOM, @Output in Angular. The subject doesn't know who its observers are — loose coupling. Foundation for reactive programming.

Progress
55/100