My student is trying to show the score increase each time you click the circle. When the program is run the score says “NaN”. I am super new to coding and cannot figure out the error. Can anyone help?
Here is a link to the project.
Thank you!
My student is trying to show the score increase each time you click the circle. When the program is run the score says “NaN”. I am super new to coding and cannot figure out the error. Can anyone help?
Here is a link to the project.
Thank you!
I took a quick look at your code and I think the error is caused because score is being declared twice when it should only be declared once. Line 6 should probably be “score = score + 1” (without the var label) since it has already been declared on line 4.
Give it a shot and let us know if you still need help with it!
thanks,
Mike
It worked! Thank you!