Help with Unit 3 Lesson 13 Step 12

I am following the code exactly as in the teacher solution, but mine is not working and I cannot figure out why…
Here is the link to my work https://studio.code.org/projects/gamelab/VnqhYXSNJIRlE7uYQFE2gCy5jtmjm1V1xo9hea3bKPM

Here is a link to the teacher solution …

@tracy.d.grayson I think I found what is causing your program not to run. If you look at your line #6, you start it with “var”. You already “declared” the clicks variable in the first line of your code, so every time you refer to it after that, you don’t need to start with “var”. If you change that link to simply read clicks = clicks + 1; (without the var), it should work.

Also, I removed the link to the teacher solution in your message because students have been known to lurk in the forum looking for answer keys. Not sure they could access it without a teacher account, but just wanted to make sure!

Hope this works! Let us know.

Mike

Wow… didn’t see that… even though Josh warns against it in the var video! Thanks!

And yes…students search for answers on Google and YouTube…