title: Create "on" event listener on javascript custom object
body: <p>How can I add <code>on</code> event listener for custom object.</p>
  <p>For example:</p>
  <pre class="lang-js prettyprint-override"><code>(function () {
      this.EmojiPicker = (function () {
          function EmojiPicker(options) {
              // ...
          }
  
          EmojiPicker.prototype.test = function () {
              //...
          };
  
          return EmojiPicker;
  
      })();
  }).call(this);
  </code></pre>
  <p>I want to add</p>
  <pre class="lang-js prettyprint-override"><code>let emojiPicker = new EmojiPicker();
  
  emojiPicker.on(&quot;change&quot;, function () {
      //
  });
  </code></pre>