LLD - Behavioral Design Patterns — Part 2
Find the bug in this Mediator usage:
class Mediator {
notify(sender, event) {
if (event === 'click') {
console.log(sender + ' clicked');
}
}
}
const mediator = new Mediator();
mediator.notify('Button');