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 trial



Is it necessary to have a function before while loop starts?

2 Answers

Steven Parker
Steven Parker
229,644 Points

It might for a particular situation, but as a general rule, no.

For more specific guidance, share the code or a reference to the video in question.

Thanks Steven for the response, i have got the clearance through next video and will get back to you again if I feel something is not clear.

Steven Parker
Steven Parker
229,644 Points

Amita Roy — Glad to help. If the question has been answered, you can mark it solved by choosing a "best answer".
Happy coding!