function Chat() {
// hander vent //
// this.message_text.on("keyup click", this.saveMessage);
$('.chat').on("click", this.init);
}
Chat.prototype.init = function() {
var sef = this;
this.hihi();
}
Chat.prototype.hihi = function() {
return 2;
}
let chat = new Chat();
I have two methods define in class type prototype. but when I call function name hihi inside function init. when I run code single with create instance with type Chat. it can't run and show error.
TypeError: this.hihi is not a function at HTMLButtonElement.Chat.init (fotozidiqo.js:9:10)
How I can call this function in init function name.