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 trialChristian Espinal
1,683 PointsHow does the return statement know where to jump back to in the flow of the program? i.e. bread-crumb of some sort
Is this action handled similarly to exceptions and the call stack?
1 Answer
Michael Hulet
47,913 PointsThe short answer is that it is the call stack. This is a bit of an oversimplification, but when you call a function, the computer hangs onto where it is in the function that's currently being run, and says "ok, I'm gonna do this work, and when I'm done, I'm gonna jump back here"