Following up on the original thread now automatically locked due to time elapsed (silly shame; too short a period!) at:
My code using
document.getElementById("someID").innerHTML = n;
wasn’t working right 'cause it was within a loop and the old value of
n would keep getting written over by the new value when the intended outcome was to display all iterated values. Well, here’s the solution to that, actually:
document.getElementById("someID").innerHTML += n;
= I needed to use
+=, as in
n = n + 1 – that’s all!*
So I’m just, I dunno, updating for the sake of posterity or something…just seems like a very important thing to note, that I only had trouble with
innerHTML due to the iterative nature of my requirements (that is, I was using them within a loop), regardless of any “higher-level/big-picture” considerations of the approach!
However, I do wish to close by stressing again that I really learned a lot from all the “higher-level/big-picture” admonishments to adopt more modern less resource-intensive approaches so I am grateful anyway!
[*] Well, actually, because a loop is involved it turned out that I also needed to increment
n twice in the code as well…but that’s a bit beside the point I’m making here.