So on the click of a button, I run some basic maths and change the innerText of some elements, which I know actually refer to the HTML elements. I also don't get any errors what so ever in the console
JS code:
buypaper.addEventListener("click", function() {
if (pcls >= papercost) {
earn(-papercost);
papercost += (papercost / 100) * 30;
papercost = Math.floor(papercost);
paper += 1;
ppc += 20;
papercounttext.innerText = `you have ${numberWithCommas(paper)} sheets of paper`; // where i suspect the error is happening
papercosttext.innerText = `price of next sheet of paper: ${numberWithCommas(papercost)} pencils`;
ppctext.innerText = `you make ${numberWithCommas(ppc)} pencils/click`;
}
});
Can anyone help?