this.second = document.getElementById('inp_2').value;//второе число
this.button.onclick = evaluate
evaluate () {
this.res.value = (+this.first.value) + (+this.second.value);
}
this.evaluate = () => {
this.res.value = (+this.first.value) + (+this.second.value);
}
onclick = this.evaluate
this.button.onclick = this.evaluate.bind(this); //Привязали контекст
evaluate = () => {
this.res.value = (+this.first.value) + (+this.second.value);
}
// Контекстом будет весь класс, так как он в области видимости анонимной функции
this.button.onclick = () => this.evaluate();
// либо
this.button.onclick = this.evaluate.bind(this);