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 trialEnzie Riddle
Front End Web Development Techdegree Graduate 19,278 PointsEnter 'q' to quit
I'm not understanding how, when we press 'q' in the console, the app quits. I thought we'd have to create a close function?
1 Answer
Eduardo Valencia
12,444 PointsHi. Quitting in this scenario simply means exiting the while loop, because the while loop displays the menu with the options. The condition in the while loop is that the input should not equal 'q'. When the user types in 'q', the condition evaluates to false, which stops the while loop. Therefore, the app quits because there is nothing else for the program to do.