(HTML && JS) My program written for class is only returning "0" when it’s supposed to calculate a number based on order of clicks

I’m struggling with my beginners coding class hw and at this point I’m desperate. I’m … Read more (HTML && JS) My program written for class is only returning "0" when it’s supposed to calculate a number based on order of clicks

I’m struggling with my beginners coding class hw and at this point I’m desperate.
I’m trying to make a program that shows a series of five images, and asks the user if they see their number on it. if yes, it should add 1,2,4,8,16 (in that order; depending on the image shown)to the total number. if no, it should add zero. Unfortunetly, it is returning 0 regardless of the buttons pressed. would love some help this is stressing me out

screenshot of what my current code looks like
screenshot of my assignment instructions

Source: JavaSript – Stack Overflow



Leave a Reply

Your email address will not be published. Required fields are marked *