there is a problem with inserting html into js , when inserting indents are added and I don’t understand why. Building a simple calculator
for (var i = 0; i < num.length; i++) {
num[i].addEventListener("click", function () {
if (!operator) {
console.log(this)
num1 += this.textContent
ny.push(num1)
console.log(ny)
result.innerHTML = num1;
} else if (operator.length > 0) {
num2 += this.textContent
result.innerHTML = num2;
}
})
}