LLD - Behavioral Design Patterns — Part 2
Analyze the following code snippet:
What will be the result of executing this code?
class NotificationSender {
send(notification) { notification.deliver(); }
}
class NullNotification {
deliver() { /* intentionally empty */ }
}
const sender = new NotificationSender();
sender.send(new NullNotification());What will be the result of executing this code?
