Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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


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.