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 JavaScript Loops, Arrays and Objects Tracking Multiple Items with Arrays Useful Array Methods

Carey Chan
Carey Chan
1,319 Points

Bug with my code? When I type 'list' in the search, the prompt comes up again and my browser and workspace freezes.

Not sure if there is something wrong with my code. I'm following along this video word for word. But whenever I preview my code and type in 'list' to get the list, the prompt just show up again and my workspace and treehouse tab in the browser completely freezes up. I have to restart everything just to get back to where I was and cannot find out why it is doing this.


2 Answers

Steven Parker
Steven Parker
218,692 Points

Did you see this comment in the code: "you'll see a blank page until you type quit in the prompt window — then you'll see all the output printed to the screen"?

After entering "list", when the prompt appears again I type "quit", and all the output appears exactly as the comment says.

Libor Gess
Libor Gess
6,563 Points

Good afternoon Carey Chan,

yes as Steven say and note the comment. But you can still write break; after the block of the code. It will break the loop and show up with the result.