evaluate () {
this.res.value = (+this.first.value) + (+this.second.value);
}
this.evaluate = () => {
this.res.value = (+this.first.value) + (+this.second.value);
}
onclick = this.evaluate
const compare= (v, v2) => {
const parts = [v, v2].map(v => String(v).split('.'))
const pow = Math.max(...parts.map(v => v.length > 1 ? v.pop().length : 0))
return Math.round(Math.abs(v - v2) * Math.pow(10, pow)) <= 1
}