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 trialKurt Kuhlman
275 PointsMy code won't restart for a new customer.
My code won't restart for a new customer, instead it will ask the name question bout if you want to purchase the same amount under the same name.
2 Answers
Steven Parker
231,269 PointsAs I mentioned in my answer to your previous question, you might want to take a look at this video about Posting a Question for hints about referencing a course and lesson.
But the code that asks for name and ticket quantity runs only once since it happens before the loop. If you want these questions to be asked again, that part of the code should be moved inside the loop.
Daniel Mula Tarancón
Full Stack JavaScript Techdegree Graduate 37,873 PointsHi Kurt,
You should put your main code inside the while loop so the app is able to restart again and ask you again for the same data. I hope this hint will help you to solve it. Otherwise, ask me if you can't.
Cheers.