0

Помогите, пожалуйста, почему после такого вот кода выдает ошибку "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;
z1ch
  • 37

0 Answers0