Помогите, пожалуйста, почему после такого вот кода выдает ошибку "this.metod1 is not a function at HTMLButtonElement.metod3"
class qwe {
constructor () {
}
metod1 () {
console.log ('123')
}
metod2 () {
console.log ('456')
}
metod3 () {
this.metod1 ()
this.metod2 ()
}
}
let asd = new qwe;
document.getElementById("resul").onclick = asd.metod3;
document.getElementById("resul").onclick = asd.metod3.bind(asd)– Stranger in the Q Jul 23 '19 at 14:09document.getElementById("resul").onclick = () => asd.metod3()– Stranger in the Q Jul 23 '19 at 14:09