Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Chrome console shows: "Uncaught SyntaxError: Unexpected token +="

I made the quizz correctly just when putting += to update the variable Chrome console is returning this message "Uncaught SyntaxError: Unexpected token +=" making the program not working. When I changed to extended version for example: var correct = correct + 1; everything works fine. Anybody knows the answer why does not accept +=?

Did you copy/past any of the code? It could be a zero-width space.

1 Answer

hm, I did copy/paste code for other questions but console is reporting error for the first question which I did write