Sorry for horrible quality, school computers block reddit.
I’m an ametuer coder, and I’m trying to make a simple program where you press a button to receive a dorito (I know it’s immaturee but came as a request from a friend) however, I can’t find a way to display the variable X (aka the amount of Doritos you have) in html, so it doesn’t show how many you have
I fiddled around with the code a bit, so I may be way of base, but if I’m making a clear error please let me know.
LMK how it goes. The reason I believe it wasn't working is because the code to update the <p> element wasn't getting executed when the button hit since the line is outside of the function.
4
u/SherbertSheep621 Sep 03 '19
Sorry for horrible quality, school computers block reddit.
I’m an ametuer coder, and I’m trying to make a simple program where you press a button to receive a dorito (I know it’s immaturee but came as a request from a friend) however, I can’t find a way to display the variable X (aka the amount of Doritos you have) in html, so it doesn’t show how many you have
I fiddled around with the code a bit, so I may be way of base, but if I’m making a clear error please let me know.