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 The Solution

Working on while loop practice. Not sure why code isn't working correctly

Here's my code if anyone is able to look it over and let me know what I am doing wrong. My question is for the whileLoop portion of the javascript code

https://w.trhou.se/bet7j98jqx

1 Answer

When run the console shows SyntaxError: Unexpected identifier at line 84. This is due to a closing bracket at line 82. Delete that and the first 4 loops look like they run correctly.

Adam Farver
Adam Farver
7,377 Points

Sometimes, when there is an error, its something just above where the error is listed.