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.

https://w.trhou.se/ju07bwridn

2 Answers

Steven Parker
Steven Parker
174,022 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
4,891 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.