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 JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Build a Quiz Challenge, Part 2 Solution

Bozena Jablonski
Bozena Jablonski
4,944 Points

Missing semi-colon after html is declared?

In the video, at the bottom of the code, the first html isn't followed by a semi-colon. I tried to add one in my code but then it didn't work, why is this please?

https://w.trhou.se/pwku29scgy

1 Answer

Hi there, use https://jshint.com/ to validate your code

Bozena Jablonski
Bozena Jablonski
4,944 Points

Hi, thanks! But there isn't an error in the code, that's why I'm confused. I'm just wondering why there doesn't need to be a semi-colon after 'html = ...'

You missed a semi-colon at line 41

html = "You got " + correctAnswers + " question(s) right."