There is a Test class with the ShowMessage method. I can assign him a new method Message. But how can I add another call to the existing one? I want to join JoinMessage. When you call ShowMessage, a message should appear Test message and then Join message
function Test() { this.ShowMessage = function() { // default method }; } function Message() { alert("Test message"); } function JoinMessage() { alert("Join message"); } var t = new Test(); t.ShowMessage = Message; // ОК t.ShowMessage += JoinMessage; // FAIL t.ShowMessage();